cupynumeric.argsort#

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

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]

See also

numpy.argsort

Availability:

Multiple GPUs, Multiple CPUs