summaryrefslogtreecommitdiff
path: root/numpy/core/ma.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/ma.py')
-rw-r--r--numpy/core/ma.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/core/ma.py b/numpy/core/ma.py
index ded2be698..df71ee825 100644
--- a/numpy/core/ma.py
+++ b/numpy/core/ma.py
@@ -668,6 +668,12 @@ class MaskedArray (object):
"""
if masked_print_option.enabled():
f = masked_print_option
+ # XXX: Without the following special case masked
+ # XXX: would print as "[--]", not "--". Can we avoid
+ # XXX: checks for masked by choosing a different value
+ # XXX: for the masked singleton? 2005-01-05 -- sasha
+ if self is masked:
+ return str(f)
else:
f = self.fill_value()
res = self.filled(f)