-
Notifications
You must be signed in to change notification settings - Fork 75
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
Undefined nodata values cause nodata checking to fail in numpy.isclose #228
Comments
Just saw another instance of this in https://community.naturalcapitalproject.org/t/habitat-quality-typeerror-ufunc-isfinite/1168/2 |
Hi @emlys! I'm going through old email and just saw this issue and draft pull request. I know this isn't the biggest deal, and I'm a little worried I don't entirely understand the issue, but if I do can I suggest a change to the proposed function name? Is this is a fix to pass through to I hope that's helpful, and in case I'm not understanding this issue at all, please feel free to disregard. |
You're right that the new function is just essentially |
Since we merged #269 , I think this might be safe to close! Feel free to reopen if needed or if there ends up being more to resolve here. |
SDR might have a similar issue happening still as reported from a forum user: https://community.naturalcapitalproject.org/t/sdr-typeerror-isfinite/2491/2 The error message:
Whole logfile |
This traceback was actually the result of a incorrectly formatted table #890 So false alarm on the undefined nodata still being a problem. |
We have encountered a number of issues on the forums (here's a recent example) where the model is crashing during the comparison of a floating-point array with an undefined nodata value. In the model, it looks something like this:
But if
nodata_value=None
:Note that if we have an integer array, comparing with
None
is no problem at all:As documented in #226, having an unset nodata value is a valid configuration of a raster and should be supported throughout InVEST.
numpy.isclose
with a possibly-undefined nodata valueThe text was updated successfully, but these errors were encountered: