-
Notifications
You must be signed in to change notification settings - Fork 285
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
Divisions by zero in cube arithmetic give inconsistent results #5523
Comments
this could be sitting a lot deeper in the stack, in netCDF4python layer, there are all manners of surprising side effects when |
Is this because |
Yes, that's the reason! Changing the data to a regular array after Thanks, I think this can be closed then 👍 |
cheers guys! Happy it's not in deeper stacks 😁 |
🐛 Bug Report
The results of zero divisions when performing cube arithmetic depend on cube shapes and whether if they have proper coordinates or not. Sometimes a proper zero-division warning is raised (with an output of
nan
), sometimes no warning is raised (with an output of--
= masked value). See following code example for more details.I guess this is somehow related iris' advanced broadcasting using coordinates.
How To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
All of these cases above should return the same output. I personally have a slight preference towards returning
nan
values, as this allows us to properly distinguish between a prior mask and the zero divisions.Environment
The text was updated successfully, but these errors were encountered: