diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-02-09 13:20:20 +0000 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2017-02-09 13:20:20 +0000 |
commit | 7500cf82370674cb609a8f1824e96d74f48591b8 (patch) | |
tree | b8027c3bf2068ec490b3d67221a404d58662565e | |
parent | e54deb5e1996648c516f32c3be0159cb6dece5a2 (diff) | |
download | numpy-7500cf82370674cb609a8f1824e96d74f48591b8.tar.gz |
MAINT: Use getmaskarray
This is subtly different in behaviour - before, if obj._mask == no_mask, the array was not created.
However, this case is not allowed anyway, so this doesn't matter
-rw-r--r-- | numpy/ma/core.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py index c23fe3e13..467cf5e3f 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -2948,8 +2948,7 @@ class MaskedArray(ndarray): # XX: This looks like a bug -- shouldn't it check self.dtype # instead? if obj.dtype.names: - _mask = getattr(obj, '_mask', - make_mask_none(obj.shape, obj.dtype)) + _mask = getmaskarray(obj) else: _mask = getmask(obj) |