- cupy.roll(a, shift, axis=None)¶
Roll array elements along a given axis.
Elements that roll beyond the last position are re-introduced at the first.
a (ndarray) – Array to be rolled.
shift (int or tuple of int) – The number of places by which elements are shifted. If a tuple, then axis must be a tuple of the same size, and each of the given axes is shifted by the corresponding number. If an int while axis is a tuple of ints, then the same value is used for all given axes.
- Return type