-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
MaskedArray.dot leaks masked values #5185
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
Curiously, the
|
Not really, ma.dot behaves the same in oldnumeric.ma and ma.
|
Note that MaskedArray.sum properly skips masked values and we have
|
What is the "right" behavior here? Since ma.dot(x, y) is defined as numpy.dot(x.filled(0), y.filed(0)), there is a strong precedent for having MaskedArray.dot do the same, but ma.dot has this unfortunate behavior:
It would be better if masked values behaved as "weak nan" and eye.dot(x) be the same as x. ("Weak nan" has the property nan * 0 = 0.) |
MaskedArray used to inherit ndarray.dot which ignored masks in the operands. Fixes issue numpy#5185.
Note that this is a regression from oldnumeric:
The text was updated successfully, but these errors were encountered: