mindspore.ops.moveaxis
- mindspore.ops.moveaxis(x, source, destination)[source]
Move axis of an array from source to destination.
Refer to
mindspore.ops.movedim()
for more detail.- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> x = mindspore.ops.zeros((3, 4, 5)) >>> output = mindspore.ops.moveaxis(x, 0, -1) >>> print(output.shape) (4, 5, 3)