cunumeric.sort#

cunumeric.sort(a: ndarray, axis: int | None = -1, kind: SortType = 'quicksort', order: str | list[str] | None = None) ndarray#

Returns a sorted copy of an array.

Parameters:
  • a (array_like) – Input array.

  • axis (int or None, optional) – Axis to sort. By default, the index -1 (the last axis) is used. If None, the flattened array is used.

  • kind ({'quicksort', 'mergesort', 'heapsort', 'stable'}, optional) – Default is ‘quicksort’. The underlying sort algorithm might vary. The code basically supports ‘stable’ or not ‘stable’.

  • order (str or list[str], optional) – Currently not supported

Returns:

out – Sorted array with same dtype and shape as a. In case axis is None the result is flattened.

Return type:

ndarray

See also

numpy.sort

Availability:

Multiple GPUs, Multiple CPUs