cf.Field.iter

Field.iter(name, *args, **kwargs)[source]

Return a single element iterable for the output of a method (with arguments).

f.iter(name, *args, **kwargs) is equivalent to [f.name(*args, **kwargs)].

Parameters :
name : str

The name of the method.

args, kwargs : optional

The arguments to be used in the call to the method.

Returns :
out : list

A single element list containing the output of the call to the method.

See also

method

Examples

>>> f.getprop('standard_name'):
air_pressure
>>> f.iter('getprop', 'standard_name'):
('air_pressure',)
>>> print f.squeeze()
None
>>> print f.iter('squeeze')
(None,)

Previous topic

cf.Field.items

Next topic

cf.Field.mask_invalid

This Page