cf.Coordinate.flip

Coordinate.flip(axes=None, i=False)[source]

Flip dimensions of the data array and bounds in place.

The trailing dimension of the bounds is flipped if and only if the coordinate is 1 or 0 dimensional.

Parameters :
axes : (sequence of) int, optional

Flip the dimensions whose positions are given. By default all dimensions are flipped.

Returns :

out : cf.Coordinate

Examples

>>> c.flip()
>>> c.flip(1)
>>> d = c.subspace[::-1, :, ::-1, :]
>>> c.flip([2, 0]).equals(d)
True

Previous topic

cf.Coordinate.fill_value

Next topic

cf.Coordinate.getattr

This Page