Skip to content

MaskedArrayFutureWarning Numpy 1.11 - does this require some cdms tweaks? #122

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

Closed
durack1 opened this issue Apr 25, 2017 · 4 comments
Closed
Assignees
Milestone

Comments

@durack1
Copy link
Member

durack1 commented Apr 25, 2017

It seems the following error is being triggered very often:

make_masks.py:247: MaskedArrayFutureWarning: setting an item on a masked array which has a shared
mask will not copy the mask and also change the original mask array in the future.
Check the NumPy 1.11 release notes for more information.
  basinmask3[yInd,xInd] = 2 ; # Correct to Pacific
@doutriaux1
Copy link
Contributor

it's a numpy thing.

@durack1
Copy link
Member Author

durack1 commented Apr 25, 2017

@doutriaux1 I don't agree, the transientVariable masks are being used within software, these are inherited from numpy, and so any changes upstream will affect the functionality

@doutriaux1
Copy link
Contributor

ok I thought your array was a numpy. @dnadeau4 can you takealook?

@jypeter
Copy link
Member

jypeter commented Apr 26, 2017

I agree with @durack1 that we want to be sure that the warning above will not lead to unexpected side effects. cdms handling masks correctly behind the scene without the user having to think about it is one of cdms assets.

Beginning users are often quite clueless about masks and at best know about NaN and you have to fight with them to use clean masks rather than rely on NaN (I think NaN is a matlab thing). Teaching newcomers to use masks correctly is on the same level as teaching them that they have to use weights for spatial averages (i.e. use cdutil.averager) rather than just performing a regular average

@doutriaux1 doutriaux1 modified the milestone: 2.10 May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants