cf.DimensionCoordinate.transpose

DimensionCoordinate.transpose(axes=None)[source]

Permute the dimensions of the data array and bounds in place.

Parameters :
axes : (sequence of) int or str, optional

The new order of the data array. By default, reverse the dimensions’ order, otherwise the axes are permuted according to the values given. The values of the sequence comprise the integer positions of the dimensions in the data array in the desired order.

Returns :

None

See also

expand_dims, flip, squeeze

Examples

>>> c.ndim
3
>>> c.transpose()
>>> c.transpose([1, 2, 0])

Previous topic

cf.DimensionCoordinate.squeeze

Next topic

cf.Domain

This Page