- sparse.roll(a, shift, axis=None)
Shifts elements of an array along specified axis. Elements that roll beyond the last position are circulated and re-introduced at the first.
a (COO) – Input array
shift (int or tuple of ints) – Number of index positions that elements are shifted. If a tuple is provided, 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 broadcasting is used so the same shift is applied to all axes.
res – Output array, with the same shape as a.
- Return type: