Parameters: |
- axes, kwargs : optional
Select axes. The axes parameter may be one, or a sequence,
of
- None. If there no kwargs arguments have been set
then selects all axes.
Any value accepted by the items parameter of the field’s
items method. Used in conjunction with the kwargs
arguments to select the axes which span the items that
would be identified by this call of the field’s items
method: f.items(items=axes, axes=None, **kwargs). See
cf.Field.items for details.
- Example:
To select the axes spanned by one dimensionsal time
coordinates: the left): f.axes('T', ndim=1).
If axes is a sequence of any combination of the above then
the selected axes are the union of those selected by each
element of the sequence.
Example:
>>> x = f.axes(['dim2', 'time', {'units': 'degree_north'}])
>>> y = set()
>>> for axes in ['dim2', 'time', {'units': 'degree_north'}]:
... y.update(f.axes(axes))
...
>>> x == y
True
If the sequence is empty then no axes are selected.
- size : optional
Select axes whose sizes equal size. Axes with a range of
sizes may be selected if size is a cf.Query object.
- Example:
size=1 selects size 1 axes.
- Example:
size=cf.ge(2) selects axes with sizes greater than 1
(see cf.ge).
- ordered : bool, optional
Return an ordered list of axes instead of an unordered
set. The order of the list will reflect any ordering specified
by the selection keywords axes and kwargs.
- Example:
If the data array axes, as returned by the field’s
data_axes method, are ['dim0', 'dim1', 'dim2'], then
f.axes([2, 0, 1, 2]) will return set(['dim0',
'dim1', 'dim2']), but f.axes([2, 0, 1, 2],
ordered=True) will return ['dim2', 'dim0', 'dim1',
'dim2'].
|