cf.FieldList.method

FieldList.method(name, *args, **kwargs)[source]

Return the results of a method applied to each field.

fl.method(name, *args, **kwargs) is equivalent to fl.name(*args, **kwargs).

Parameters :
name : str

The name of the method to apply to each element.

args, kwargs : optional

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

Returns :
out : cf.FieldList or cf.List

The results of the named method applied to each element.

See also

iter

Examples

>>> fl.getprop('standard_name')
['air_temperature', 'eastward_wind']
>>> fl.method('getprop', 'standard_name')
['air_temperature', 'eastward_wind']
>>> fl.method('squeeze')
[None, None]

Previous topic

cf.FieldList.match

Next topic

cf.FieldList.name

This Page