cf.CoordinateBounds.transpose

CoordinateBounds.transpose(axes=None, i=False)

Permute the dimensions of the data array.

See also

expand_dims, flip, squeeze

Parameters:
axes : (sequence of) int

The new axis order of the data array. By default the order is reversed. Each axis of the new order is identified by its original integer position.

i : bool, optional

If True then update the coordinate bounds in place. By default a new coordinate bounds is created. In either case, a coordinate bounds is returned.

Returns:

out : cf.CoordinateBounds

Examples:
>>> f.shape
(2, 3, 4)
>>> f.transpose()
>>> f.shape
(4, 3, 2)
>>> f.transpose([1, 2, 0])
>>> f.shape
(3, 2, 4)
>>> f.transpose((1, 0, 2))
>>> f.shape
(2, 3, 4)