Warn about NaNs when interpolating? #5842
Unanswered
johnomotani
asked this question in
Ideas
Replies: 1 comment
-
That definitely seems like something we should warn about! Perhaps even raise an error. Could you raise an issue with a minimal example? Also do you know what happens if you feed |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When using
DataArray.interp()
to interpolate a 3d array along one dimension, I was surprised to end up with an output full of NaN. There were NaNs in a few elements in one corner of the original array, but the result has NaN even at points where the interpolation does not depend on the NaN in the input. I think the interpolation is done byscipy.interpolate.interp1d
, whose documentation says:Probably we can't do anything to actually fix this, but I think it'd be nice to at least raise a warning or an error if the input has any NaNs, so that the user can do something about it (possibly suggest using
DataArray/Dataset.fillna
?).Beta Was this translation helpful? Give feedback.
All reactions