pub fn sort_by_key<K, V>(
keys: &Array<K>,
vals: &Array<V>,
dim: u32,
ascending: bool,
) -> (Array<K>, Array<V>)
Expand description
Sort the values in input Arrays
Sort an multidimensional Array based on keys
§Parameters
keys
- Array with key valuesvals
- Array with input valuesdim
- Dimension along which to sortascending
- Sorted output will have ascending values ifTrue
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 sorted values.