mlx_rs::ops

Function argsort_all_device

Source
pub fn argsort_all_device(
    a: impl AsRef<Array>,
    stream: impl AsRef<Stream>,
) -> 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);