dpnp.moveaxis
- dpnp.moveaxis(x1, 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.Limitations
Input array
x1is supported asdpnp.ndarray. Otherwise the function will be executed sequentially on CPU. Sizes of normalized input arrays are supported to be equal. Input array data types are limited by supported DPNP Data types.See also
dpnp.transposePermute the dimensions of an array.
dpnp.swapaxesInterchange 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)