pub fn window_max(data: &[f64], window_size: usize) -> Vec<f64>
Sliding-window maximum.
Returns a vector of length max(0, data.len() - window_size + 1). Each element is the maximum of the corresponding window.
max(0, data.len() - window_size + 1)