Interpolation of one and two dimensional arrays.
- Rust 100%
| .reuse | Add missing files. | |
| LICENSES | Add missing files. | |
| src | Relax trait bounds. | |
| .woodpecker.yml | CI: adapt woodpecker script to changes in CI | |
| Cargo.toml | update ndarray | |
| README.md | REUSE compliance. | |
1D & 2D Interpolation
interp provides functions for interpolation of one dimensional and two dimensional array.
Example
useinterp::interp2d::Interp2D;// Create 2D array of values.
letgrid=ndarray::array![[0.0f64,0.0,0.0],[0.0,1.0,0.0],[0.0,0.0,0.0]];// Create grid coordinates.
letxs=vec![0.0,1.0,2.0];letys=vec![3.0,4.0,5.0];// Create interpolator struct.
letinterp=Interp2D::new(xs,ys,grid);// Evaluate the interpolated data at some point.
assert!((interp.eval_no_extrapolation((1.0,4.0)).unwrap()-1.0).abs()<1e-6);