maxframe.tensor.rollaxis#
- maxframe.tensor.rollaxis(tensor, axis, start=0)[source]#
Roll the specified axis backwards, until it lies in a given position.
This function continues to be supported for backward compatibility, but you should prefer moveaxis.
- Parameters:
- Returns:
res – a view of a is always returned.
- Return type:
Tensor
See also
Examples
>>> import maxframe.tensor as mt
>>> a = mt.ones((3,4,5,6)) >>> mt.rollaxis(a, 3, 1).shape (3, 6, 4, 5) >>> mt.rollaxis(a, 2).shape (5, 3, 4, 6) >>> mt.rollaxis(a, 1, 4).shape (3, 5, 6, 4)