-
Notifications
You must be signed in to change notification settings - Fork 57
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
fix issue where roundtripping a masked array strips the mask if no values are masked #1803
fix issue where roundtripping a masked array strips the mask if no values are masked #1803
Conversation
Would you add a changelog for this that documents the fixed bug? Also, would you either move the test near: |
92c98da
to
d693b19
Compare
There's one more issue and I'm a little scared now (not from this PR but from what follows): import numpy as np
arr = np.arange(5)
m0 = np.ma.masked_array(arr, True)
m1 = np.ma.masked_array(arr, False)
np.testing.assert_array_equal(m0, m11) The last assert does not fail :-/ so apparently assert_array_equal does not consider the mask. The same is true for Line 55 in 33e7095
which drops the mask. Would you update the test to not use |
00c9703
to
503595c
Compare
Co-authored-by: Brett Graham <[email protected]>
To add to the confusion, the test is failing because: >> (m0 == m1).all()
masked when m0 and m1 are both fully masked and matching values. So I think we need to compare |
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.
Thanks! One more bug squished.
Description
resolves #1768
Checklist:
for a public change, a changelog entry was addedfor a public change, documentation was updated