icecube / pisa

Monte Carlo-based data analysis
http://icecube.github.io/pisa/
Apache License 2.0
19 stars 47 forks source link

scipy.interpolate.interp1d may be removed in future scipy version #801

Open JanWeldert opened 1 month ago

JanWeldert commented 1 month ago

We use from scipy.interpolate import interp1d in multiple parts of the code, namely

At the moment we are safe because we limit the scipy version, but in the future when we allow for newer versions of scipy this might become a problem.

thehrh commented 1 month ago

I'm finding a few more occurrences: https://github.com/search?q=repo%3Aicecube%2Fpisa%20interp1d&type=code

thehrh commented 1 month ago

Scipy docs suggest the following replacement for "broken-line" interpolation: https://docs.scipy.org/doc/scipy/tutorial/interpolate/1D.html#piecewise-linear-interpolation

JanWeldert commented 1 month ago

But in the numpy version you have to do the interpolation again every time you want to evaluate it.