pub fn rank(x: &[f64]) -> Vec<f64>
Ranks starting at 1, with tied values given the average of their ranks.