diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-06-30 21:58:33 +0100 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2017-06-30 21:58:33 +0100 |
commit | 7254888b9ffe1f26ce59600ad31b7d4c9135c13d (patch) | |
tree | e01683f338865d6f0a724839b1bcca6fff03b841 /numpy/ma/core.py | |
parent | 4bbbca2dda4099f689a8fb195696062ed783e4ce (diff) | |
download | numpy-7254888b9ffe1f26ce59600ad31b7d4c9135c13d.tar.gz |
ENH: Make duplicated masked constants obvious
Diffstat (limited to 'numpy/ma/core.py')
-rw-r--r-- | numpy/ma/core.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py index ab4364706..2c62019cd 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -6206,7 +6206,11 @@ class MaskedConstant(MaskedArray): return str(masked_print_option._display) def __repr__(self): - return 'masked' + if self is masked: + return 'masked' + else: + # something is wrong, make it obvious + return object.__repr__(self) def flatten(self): return masked_array([self._data], dtype=float, mask=[True]) |