csaps 0.5.0

Cubic spline approximation (smoothing)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use itertools::Itertools;
use ndarray::Dimension;

/// Creates a dimension from the vector with the specified ndim
pub(crate) fn dim_from_vec<D>(ndim: usize, dimv: Vec<usize>) -> D
where
    D: Dimension,
{
    let mut dim = D::zeros(ndim);
    dim.as_array_view_mut().iter_mut().set_from(dimv);
    dim
}