sparse.flip(x, /, *, axis=None)[source]

Reverses the order of elements in an array along the given axis.

The shape of the array is preserved.

  • a (COO) – Input COO array.

  • axis (int or tuple of ints, optional) – Axis (or axes) along which to flip. If axis is None, the function must flip all input array axes. If axis is negative, the function must count from the last dimension. If provided more than one axis, the function must flip only the specified axes. Default: None.


result – An output array having the same data type and shape as x and whose elements, relative to x, are reordered.

Return type: