-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix resample/interpolate for non-upsampling case #1608
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
Conversation
Great catch; do you need any input from me @jhamman ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like these "move one line of code" fixes!
xarray/tests/test_dataarray.py
Outdated
dims=('time', 'x', 'y'), | ||
coords={'time': dates}) | ||
actual = expected.resample(time='1D').interpolate('linear') | ||
self.assertDataArrayAllClose(actual, expected, rtol=1e-16) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jhamman reminder to use the assert functions rather than self. ...
methods, for future PRs
yes, this was a nice and easy fix. In the future, it may be nice to fast track no-op resample/interpolation since this does end up doing the same computation as it would if there were actual missing values but, this is a nice improvement for now. Thanks again @darothen for the upsampling and resample refactor. |
I'm a bit slow on the uptake here, but big 👍 from me. Thanks for catching this bug! |
git diff upstream/master | flake8 --diff
[ ] Fully documented, includingwhats-new.rst
for all changes andapi.rst
for new APIcc @darothen