-
-
Notifications
You must be signed in to change notification settings - Fork 11k
append bug : masked array #478
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
Comments
Looks like this is fixed on master. On 1.6.1:
(note that the original data's mask shape has been changed) In numpy '1.8.0.dev-e18e744':
It would be nice if |
The original issue from @bblay has been fixed for quite some time as indicated by @pelson and is still fixed in the current master. The inappropriate mask issue was dicussed on the numpy mailing list in September 2010. Trac ticket (1623) became GH #2219 and was closed with the addition of ma.append in #4339. I believe with this change this issue can be closed. |
As an example of the new behavior import numpy as np
print np.version.version
data = np.arange(6).reshape(3,2)
data = np.ma.masked_greater(data, 0)
new_arr = np.ma.append(data, data[:, -1:], axis=1)
print "data.shape", data.shape
print "data.mask", data.mask
print "data.mask.shape", data.mask.shape
print "new_arr.mash", new_arr.mask
print "new_arr.mask.shape", new_arr.mask.shape
|
OK, thanks for the heads up. Closing. |
The source
data
should not be modified bynumpy.append
:Output:
(using v1.6.1)
The text was updated successfully, but these errors were encountered: