-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
numpy masked array regression in 1.13.0rc1 #9121
Comments
This was an intentional change in #8905, but we didn't note it in the release notes. (Probably we should). I think the new behavior is more correct because in general indexing with >>> np.array(3)[...]
array(3)
>>> np.int64(3)[...]
array(3)
>>> np.arange(2)[...]
array([0, 1]) if you goal is to convert a 0d array to a scalar, I think you should replace >>> x = np.ma.array(1, mask=True)
>>> x[()] is np.ma.masked
True |
OK - thanks for the clarification. Close if you wish. |
@ahaldane Probably worth a note in the 1.9.0 release notes under compatibility. |
…isis indexing Fixes numpy#9121 [ci skip]
…isis indexing Fixes numpy#9121 [ci skip]
…isis indexing Fixes numpy#9121 [ci skip]
With version 1.12.1 the following script
produced
With 1.13.0rc1 I get
This means that
x[...] is ma.masked
returnsFalse
in 1.13, when it used to returnTrue
.So it appears that the behaviour of scalar masked arrays has changed. This is causing test failures in netcdf4-python.
The text was updated successfully, but these errors were encountered: