copapy.argsort#

copapy.argsort(input_vector)#

Perform an indirect sort. It returns a vector of indices that index data in sorted order. Equal elements are in order of their index (like a stable sort).

Parameters:

input_vector (ArrayType[Any]) – The input vector (or 1D tensor) containing numerical values.

Return type:

vector[int]

Returns:

Index vector.