argsort

ivy.argsort(x, axis=- 1, f=None)[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:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty