cupy.sort

cupy.sort(a, axis=-1)[source]

Returns a sorted copy of an array with a stable sorting algorithm.

Parameters
  • a (cupy.ndarray) – Array to be sorted.

  • axis (int or None) – Axis along which to sort. Default is -1, which means sort along the last axis. If None is supplied, the array is flattened before sorting.

Returns

Array of the same type and shape as a.

Return type

cupy.ndarray

Note

For its implementation reason, cupy.sort currently does not support kind and order parameters that numpy.sort does support.

See also

numpy.sort()