pub fn cumulative_trapezoid(
y: &[f64],
spacing: Spacing<'_>,
initial: Option<f64>,
) -> Result<Vec<f64>, ErrorsJSL>Expand description
The running trapezoid integral: element i integrates over the first i + 1 samples
(SciPy’s cumulative_trapezoid). With initial, that value is prepended and added, so the
result has the length of y; otherwise it is one shorter.