Remove and return axes from the field.
By default all axes of the domain are removed, but particular axes may
be selected with the keyword arguments.
The axis may be selected with the keyword arguments. If no unique axis
can be found then no axis is removed and None is returned.
If an axis has size greater than 1 then it is not possible to remove
it if it is spanned by the field’s data array or any multidimensional
coordinate or cell measure object of the field.
Parameters: |
- axes, kwargs : optional
Select axes. The axes parameter may be one, or a sequence,
of:
- None. If no kwargs arguments have been set
then all axes are selected. This is the default.
Any value accepted by the items parameter of the field’s
items method. Used in conjunction with the kwargs
parameters 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: f.remove_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. If the sequence is empty then no axes
are selected.
- size : optional
Select axes whose sizes equal size. Axes whose sizes lie
within a range 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).
|
Returns: |
- out : set
The removed axes. The set may be empty.
|
Examples: | |