cf.Data.flip

Data.flip(axes=None)[source]

Flip dimensions of the data array in place.

Parameters :
axes : (sequence of) int, optional

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

Returns :
out : list of ints

The axes which were flipped, in arbitrary dimensions.

Examples

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

Previous topic

cf.Data.flat

Next topic

cf.Data.func

This Page