dpnp.rollaxis
- dpnp.rollaxis(x1, axis, start=0)[source]
Roll the specified axis backwards, until it lies in a given position.
For full documentation refer to
numpy.rollaxis
.Limitations
Input array is supported as
dpnp.ndarray
. Parameteraxis
is supported as integer only. Parameterstart
is limited by-a.ndim <= start <= a.ndim
. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP Data types.See also
dpnp.moveaxis
Move array axes to new positions.
dpnp.roll
Roll the elements of an array by a number of positions along a given axis.
Examples
>>> import dpnp as np >>> a = np.ones((3,4,5,6)) >>> np.rollaxis(a, 3, 1).shape (3, 6, 4, 5) >>> np.rollaxis(a, 2).shape (5, 3, 4, 6) >>> np.rollaxis(a, 1, 4).shape (3, 5, 6, 4)