-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix pandas' interpolate(fill_value=)
error
#8139
Conversation
Pandas no longer has a `fill_value` parameter for `interpolate`. Weirdly I wasn't getting this locally, on pandas 2.1.0, only in CI on https://github.com/pydata/xarray/actions/runs/6054400455/job/16431747966?pr=8138. Removing it passes locally, let's see whether this works in CI
interpolate(fill_value=)
error
This indeed fixes the errors. I've been away for a while so don't want to self-merge quite yet, but will if no one comments otherwise in the next day or so... |
@max-sixty This is a regression bug in pandas, see pandas-dev/pandas#54920.
|
OK — though does it not being required for the tests to pass suggest we can merge it regardless? |
The tests pass because np.nan is the default fill_value in the scipy interpolators and maybe because fill_value is actually not needed for these specific tests. That would indicate, that the tests would need adaption to take fill_value correctly into account as needed for the scipy based interpolation methods. Please have a look here at the scipy docs https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.LinearNDInterpolator.html#scipy.interpolate.LinearNDInterpolator _Value used to fill in for requested points outside of the convex hull of the input points. If not provided, then the default is nan. |
Right — agree the argument isn't doing anything in these tests. Is there a good reason to keep it vs. merging to fix the tests? I also agree that we could have different tests which test for |
@max-sixty Although upstream has milestoned this issue for the next release it might still take some time. Maybe it's easiest to move forward here and open an issue to create proper tests which take |
Pandas no longer has a
fill_value
parameter forinterpolate
.Weirdly I wasn't getting this locally, on pandas 2.1.0, only in CI on https://github.com/pydata/xarray/actions/runs/6054400455/job/16431747966?pr=8138.
Removing it passes locally, let's see whether this works in CI
Would close #8125