1
0
Fork
You've already forked interp
0
Interpolation of one and two dimensional arrays.
  • Rust 100%
2025年11月13日 15:36:20 +00:00
.reuse Add missing files. 2022年05月18日 13:49:48 +02:00
LICENSES Add missing files. 2022年05月18日 13:49:48 +02:00
src Relax trait bounds. 2023年06月07日 23:33:54 +02:00
.woodpecker.yml CI: adapt woodpecker script to changes in CI 2023年08月16日 13:13:39 +02:00
Cargo.toml update ndarray 2025年11月13日 15:36:20 +00:00
README.md REUSE compliance. 2022年05月11日 15:53:39 +02:00

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);