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

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

Closed
durack1 opened this Issue Apr 25, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@durack1
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

This comment has been minimized.

Member

doutriaux1 commented Apr 25, 2017

it's a numpy thing.

@doutriaux1 doutriaux1 closed this Apr 25, 2017

@durack1

This comment has been minimized.

Member

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

This comment has been minimized.

Member

doutriaux1 commented Apr 26, 2017

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

@jypeter

This comment has been minimized.

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