diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/ma/core.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py index 7f17d4adf..8e7ac9c4b 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -5428,7 +5428,7 @@ class MaskedArray(ndarray): result = self.view(np.ndarray).mean(axis=axis, dtype=dtype, **kwargs) if isinstance(result, np.ndarray): - result = MaskedArray(result, mask=False) + result = MaskedArray(result, mask=nomask) else: is_float16_result = False if dtype is None: @@ -5514,7 +5514,7 @@ class MaskedArray(ndarray): ret = self.view(np.ndarray).var(axis=axis, dtype=dtype, ddof=ddof, **kwargs) if isinstance(ret, np.ndarray): - ret = MaskedArray(ret, mask=False) + ret = MaskedArray(ret, mask=nomask) if out is not None: out.flat = ret if isinstance(out, MaskedArray): |