cf.Field.axes_sizes

Field.axes_sizes(axes=None, size=None, key=False, **kwargs)[source]

Return the size a of a domain axis.

See also

axis, axis_size, axis_identity, axis_name

Parameters:
axes, kwargs : optional

Select the axes which would be selected by this call of the field’s axes method: f.axes(axes, **kwargs). See cf.Field.axes for details.

size : int, optional

Select axes with this size.

key : bool, optional

In the output dictionary, identify axes by domain identifier, rather than by name.

Returns:
out : dict

The sizes of the axes.

Examples:
>>> f
<CF Field: eastward_wind(time(3), air_pressure(5), latitude(110), longitude(106)) m s-1>
>>> f.axes_sizes()
{'air_pressure': 5, 'latitude': 110, 'longitude': 106, 'time': 3}
>>> f.axes_sizes(size=3)
{'time': 3}

Previous topic

cf.Field.axes

Next topic

cf.Field.axis

This Page