mlx_rs::ops::indexing

Function argpartition_all

Source
pub fn argpartition_all(a: impl AsRef<Array>, kth: i32) -> Result<Array>
Expand description

Returns the indices that partition the flattened array.

The ordering of the elements within a partition in given by the indices is undefined.

ยงParams

  • a: The input array.
  • kth: Element index at the kth position in the output will give the sorted position. All indices before thekth position will be of elements less than or equal to the element at the kth index and all indices after will be elemenents greater than or equal to the element at the kth position.