cf.Field.reverse_dims

Field.reverse_dims(axes=None)

Reverse the directions of data array axes in place.

Equivalent to indexing the specified dimensions with ::-1.

Parameters :
axes : sequence, optional

The dimensions to have reversed directions. By default, reverse the directions of all dimensions. Dimensions for direction reversal may be identified with one of, or a sequence of any combination of:

  • A dimension’s standard name.
  • The integer position of a dimension in the data array.
  • The field’s space’s internal name of a dimension
Returns :

None

Examples

>>> f.reverse_dims()
>>> f.reverse_dims('time')
>>> f.reverse_dims(1)
>>> f.reverse_dims('dim2')
>>> f.reverse_dims(['time', 1, 'dim2'])

Previous topic

cf.Field.name

Next topic

cf.Field.setattr

This Page