-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Problem with views on masked structured arrays #10483
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
Thanks for the report, confirmed. This is very similar to, or caused by, #10387, which itself is indirectly caused by our recent change in numpy 1.14.0 to return a view instead of a copy for multi-field indexing. We're on it. We are planning to revert that change in 1.14.1, and push it off to 1.15. That will give us time to fix this and similar bugs that need to be fixed first (#3176, #8100). This report is a little different from #10387, because it is likely that the |
Perhaps we should start deprecating cases that give a different result. |
Pushing off to 1.16. @ahaldane How do you want to handle the 1.15 fix? If you want to keep master as is we should wait until 1.15 is branched. |
Uh oh!
There was an error while loading. Please reload this page.
Create a view on a structured array (e.g. selecting a list of columns) causes problems with comparisons when the array is masked.
Example
Create a view on a masked structured array:
Try to do a comparison on the array:
A similar problem happens when calling
numpy.ma.unique
on the view. The problem persists even after copying the data (e.g.data2 = data2.copy()
)I am using numpy 1.14.0 with Python 2.7.6. The problem does not appear in numpy 1.13.3, or when using a regular (non-masked) structured array.
The text was updated successfully, but these errors were encountered: