cunumeric.argsort#

cunumeric.argsort(a, axis=- 1, kind='quicksort', order=None)#

Returns the indices that would sort 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

index_array – Array of indices that sort a along the specified axis. It has the same shape as a.shape or is flattened in case of axis is None.

Return type

ndarray[int]

Notes

The current implementation has only limited support for distributed data. Distributed 1-D or flattened data will be broadcasted.

See also

numpy.argsort

Availability

Multiple GPUs, Single CPU