-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
MAINT: Hide nan warnings for masked internal MA computations #7349
Conversation
"this should fail" is pretty uninformative, needs improvement. |
The last commit is temporary, I'll remove it in a minute. It reverts some of the changes of the previous commit to make sure the unit tests fail. |
@@ -1123,7 +1129,7 @@ def __call__(self, a, b, *args, **kwargs): | |||
# Apply the domain | |||
domain = ufunc_domain.get(self.f, None) | |||
if domain is not None: | |||
m |= filled(domain(da, db), True) | |||
m |= domain(da, db) |
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.
This change seems radical. What is the intent?
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.
The call to filled
has no effect since da and db have no masked values (they are just the data arrays of a and b).
Some comments would help keep/make the code more understandable. |
e7fab53
to
fd19bf3
Compare
Looks good! |
MAINT: Hide nan warnings for masked internal MA computations
Thanks Allan. |
This prevents
RuntimeWarning
s when there is anp.nan
value in a masked position in a masked array, eg(This PR was split off from #5706)
On my computer I'm still having trouble getting the unit tests actually detect the warnings, even though I see them in a python shell. I'm adding a temporary commit that should cause unit tests to fail, to see if appveyor catches it.