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.

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

Previous topic

cf.Data.flat

Next topic

cf.Data.func

This Page