Thanks to visit codestin.com
Credit goes to docs.rs

sort_index

Function sort_index 

Source
pub fn sort_index<T>(
    input: &Array<T>,
    dim: u32,
    ascending: bool,
) -> (Array<T>, Array<u32>)
where T: HasAfEnum + RealNumber,
Expand description

Sort the values in input Arrays

§Parameters

  • input - Input Array
  • dim - Dimension along which to sort
  • ascending - Sorted output will have ascending values if True and descending order otherwise.

§Return Values

A tuple of Arrays.

The first Array contains the keys based on sorted values.

The second Array contains the original indices of the sorted values.