pub fn lexsort<T>(
keys: &[&Array<T, Ix1>],
) -> Result<Array<u64, Ix1>, FerrayError>Expand description
Indirect stable sort using a sequence of keys.
keys is a list of 1-D arrays of the same length. The last key
in the list is the primary sort key (matching NumPy’s
numpy.lexsort convention); ties are broken by the second-to-last
key, then the third-to-last, and so on. Returns a permutation
idx such that keys[-1][idx] is non-decreasing.
Implementation notes: the underlying sort is sort_by (stable),
applied once with a comparator that walks the keys from primary
(last) to secondary (earlier). This avoids the multi-pass stable
sort that NumPy historically used.
§Errors
FerrayError::InvalidValueifkeysis empty or the keys have different lengths.