icecube / pisa

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

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

Open JanWeldert opened 3 months ago

JanWeldert commented 3 months 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 3 months ago

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

thehrh commented 3 months 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 3 months ago

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