-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add a masking functionality #271
Conversation
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.
Looks great! This will be super useful 👍. Doing this operation for masked arrays (especially within another object) is not something intuitive for all.
I have only a little comment on the tests: we could add an assertion using np.array_equal
to check that the exact content of the mask is preserved? Right now if I got it right, it's only the counts.
Good point ! Especially when testing that the previous mask is preserved. Summing the count works if the two masks do not overlap (which is the case here), otherwise not... |
While I was on it, I also fixed issue #233. |
This is in reply to issue #235.
I added a new method to Raster to set the data mask.
Example: