mlx_rs::ops

Function argsort_all

Source
pub fn argsort_all(a: impl AsRef<Array>) -> Result<Array>
Expand description

Returns the indices that sort the flattened array. Returns an error if the arguments are invalid.

§Params

  • a: The array to sort.

§Example

use mlx_rs::{Array, ops::*};

let a = Array::from_slice(&[3, 2, 1], &[3]);
let result = argsort_all(&a);