0

I'm porting some scientific python code to Rust as a learning exercise. In the Python version, I make use of scipy.interp1d, which I'm using to do things like the following:

  • Given sorted array x and array y, calculate array new_y using new_x. (with some flexibility of algorithm, linear, cubic etc.).

https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.interp1d.html#scipy.interpolate.interp1d

Does anyone have nice Rust examples of this? I found the 'enterpolate' crate, but it seems mostly suited to interpolating to fixed interval x data. Is there anything in 'ndarray' that does interpolation?

John Brodie
  • 971
  • 1
  • 6
  • 5

0 Answers0