dpnp.argsort
- dpnp.argsort(in_array1, axis=- 1, kind=None, order=None)[source]
Returns the indices that would sort an array.
For full documentation refer to
numpy.argsort.Limitations
Input array is supported as
dpnp.ndarray. Otherwise the function will be executed sequentially on CPU. Prametersaxisis supported only with default value-1. Prameterskindis supported only with default valueNone. Prametersorderis supported only with default valueNone. Input array data types are limited by supported DPNP Data types.See also
dpnp.sortDescribes sorting algorithms used.
dpnp.lexsortIndirect stable sort with multiple keys.
dpnp.argpartitionIndirect partial sort.
dpnp.take_along_axisApply
index_arrayfrom argsort to an array as if by calling sort.
Examples
>>> import dpnp as np >>> x = np.array([3, 1, 2]) >>> out = np.argsort(x) >>> [i for i in out] [1, 2, 0]