dpnp.moveaxis
- dpnp.moveaxis(a, source, destination)[source]
Move axes of an array to new positions. Other axes remain in their original order.
For full documentation refer to
numpy.moveaxis
.- Parameters:
- Returns:
out -- Array with moved axes. This array is a view of the input array.
- Return type:
dpnp.ndarray
See also
dpnp.transpose
Permute the dimensions of an array.
dpnp.swapaxes
Interchange two axes of an array.
Examples
>>> import dpnp as np >>> x = np.zeros((3, 4, 5)) >>> np.moveaxis(x, 0, -1).shape (4, 5, 3) >>> np.moveaxis(x, -1, 0).shape (5, 3, 4)