summaryrefslogtreecommitdiff
path: root/numpy/core/ma.py
diff options
context:
space:
mode:
authorsasha <sasha@localhost>2006-01-06 03:27:18 +0000
committersasha <sasha@localhost>2006-01-06 03:27:18 +0000
commit842f9779b63236828785322b5d4a7fc53950a404 (patch)
treef26df804011e93485ef9bd1d6a763c0096851200 /numpy/core/ma.py
parent543811b1592d63a57e17b62661b9ed2b33978498 (diff)
downloadnumpy-842f9779b63236828785322b5d4a7fc53950a404.tar.gz
Fixed printing of the masked objects
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)