# argsort¶

ivy.argsort(x: Union[ivy.Array, ivy.NativeArray], axis: int = - 1, f: Optional[ivy.Framework] = None) → Union[ivy.Array, ivy.NativeArray][source]

Returns the indices of a tensor that give its sorted order along an axis.

Parameters
• x (array) – Input array containing elements to argsort.

• axis (int, optional) – Axis to perform the argsort, default is -1.

• f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.

Returns

The indices that would sort each slice of the given values along the given axis.

Supported Frameworks: