cf.Field.method

Field.method(callable_method, *args, **kwargs)[source]

Return the results of a callable method (with arguments) applied to the field.

f.method(callable_method, *args, **kwargs) is equivalent to f.callable_method(*args, **kwargs).

Parameters:
callable_method : str

The name of the method to be called.

args, kwargs : optional

Any arguments accepted by the method given by the callable_method argument.

Returns:
out :

The result of the application of the callable method.

Examples:
>>> f.getprop('standard_name')
'air_temperature'
>>> f.method('getprop', 'standard_name')
'air_temperature'
>>> print f.method('squeeze')
None

Previous topic

cf.Field.measures

Next topic

cf.Field.mid_range

This Page