8000 BUG: Revert using __array_ufunc__ for MaskedArray by mattip · Pull Request #22016 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG: Revert using __array_ufunc__ for MaskedArray #22016

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

Merged
merged 6 commits into from
Jul 20, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "nomask in nomask out" from 21977
This reverts commit db1a98b.
  • Loading branch information
mattip committed Jul 20, 2022
commit acaf2556ba23d73ec2e855d1f5fdd05166e5b5a4
4 changes: 2 additions & 2 deletions numpy/ma/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -5428,7 +5428,7 @@ def mean(self, axis=None, dtype=None, out=None, keepdims=np._NoValue):
result = self.view(np.ndarray).mean(axis=axis,
dtype=dtype, **kwargs)
if isinstance(result, np.ndarray):
result = MaskedArray(result, mask=nomask)
result = MaskedArray(result, mask=False)
else:
is_float16_result = False
if dtype is None:
Expand Down Expand Up @@ -5514,7 +5514,7 @@ def var(self, axis=None, dtype=None, out=None, ddof=0,
ret = self.view(np.ndarray).var(axis=axis, dtype=dtype,
ddof=ddof, **kwargs)
if isinstance(ret, np.ndarray):
ret = MaskedArray(ret, mask=nomask)
ret = MaskedArray(ret, mask=False)
if out is not None:
out.flat = ret
if isinstance(out, MaskedArray):
Expand Down
0