cf.Data.flip

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

Flip (reverse the direction of) axes of the data array in place.

Parameters:
axes
: (sequence of) int

Select the axes. By default all axes are flipped. Each axis is identified by its integer position. No axes are flipped if axes is an empty sequence.

i
: bool, optional

If True then update the data array in place. By default a new data array is created.

Returns:

out : cf.Data

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