csaps 0.5.0

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

pub(super) fn permute_axes<D>(ndim: usize) -> D
where
    D: Dimension,
{
    let mut permute_axes = D::zeros(ndim);

    permute_axes[0] = ndim - 1;
    for ax in 0..(ndim - 1) {
        permute_axes[ax + 1] = ax;
    }

    permute_axes
}