You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The interp1d docs state:
This class is considered legacy and will no longer receive updates. This could also mean it will be removed in future SciPy versions. For a guide to the intended replacements for interp1d see 1-D interpolation.
However, the 1D interpolation docs then just point to numpy.interp for piecewise linear interpolation:
If all you need is a linear (a.k.a. broken line) interpolation, you can use the numpy.interp routine. It takes two arrays of data to interpolate, x, and y, and a third array, xnew, of points to evaluate the interpolation on.
However, np.interp is not a replacement for interp1d.
It lacks the equivalent options for the bounding conditions and extrapolation and it always requires sorted input.
It would also make it much easier to compare interpolations using different methods if all would share the same API.
Describe the solution you'd like.
A non-legacy version of interp1d following the same API as the other new classes for piece-wise interpolation.
Describe alternatives you've considered.
No response
Additional context (e.g. screenshots, GIFs)
No response
The text was updated successfully, but these errors were encountered:
Adding yet another way of doing linear interpolation is not something we would do really.
Legacy code may keep using legacy functions, new code can either keep using interp1d (we do not recommend it, but you can full well not follow the recommendation, it's really up to you), or use what we believe are better alternatives.
No follow-up, so I'm going to close this. Thank you @maxnoe for the suggestion regardless!
Documentation improvements are very welcome either way, both for making the "slinear" interpolation more discoverable and for the legacy note wording.
Is your feature request related to a problem? Please describe.
The interp1d docs state:
However, the 1D interpolation docs then just point to
numpy.interp
for piecewise linear interpolation:However, np.interp is not a replacement for
interp1d
.It lacks the equivalent options for the bounding conditions and extrapolation and it always requires sorted input.
It would also make it much easier to compare interpolations using different methods if all would share the same API.
Describe the solution you'd like.
A non-legacy version of
interp1d
following the same API as the other new classes for piece-wise interpolation.Describe alternatives you've considered.
No response
Additional context (e.g. screenshots, GIFs)
No response
The text was updated successfully, but these errors were encountered: