pub fn labels_to_ranks(labels: &[usize]) -> Box<[usize]>
Computes the ranks of a slice of labels by their natural order.