Skip to content

MaskedArray.dot not considering mask? #3219

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

Closed
tkf opened this issue Apr 10, 2013 · 1 comment
Closed

MaskedArray.dot not considering mask? #3219

tkf opened this issue Apr 10, 2013 · 1 comment

Comments

@tkf
Copy link
Contributor

tkf commented Apr 10, 2013

masked.dot(other) is equivalent to numpy.dot(masked, other), rather than numpy.ma.dot(masked, other).

In [1]:
import numpy
a = numpy.ma.array([0, 1], mask=True)
b = numpy.ma.array([0, 1])

In [2]:
a.dot(b)
Out [2]:
1

In [3]:
numpy.ma.dot(a, b)
Out [3]:
masked_array(data = --,
             mask = True,
       fill_value = 999999)
@jjhelmus
Copy link
Contributor

Thanks for reporting this issue @tkf. This issue with the dot method not respecting the mask was fixed in PR #5709.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants