pub fn mode(x: &[f64]) -> Result<(f64, usize), ErrorsJSL>
The most frequent value and its count; ties go to the smallest value (SciPy’s mode).
mode