summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorsasha <sasha@localhost>2006-01-08 06:45:56 +0000
committersasha <sasha@localhost>2006-01-08 06:45:56 +0000
commit9974432933d79aa0ec94344a56e280bd015b7652 (patch)
treeb6ac65b86208259a2d7204762b1146c090cba87d /numpy
parentb12fbb15a6d920272a7073a4c08cd4a3f57d6d56 (diff)
downloadnumpy-9974432933d79aa0ec94344a56e280bd015b7652.tar.gz
Fixed printing of masked arrays
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/ma.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/core/ma.py b/numpy/core/ma.py
index 52447d236..74594f97c 100644
--- a/numpy/core/ma.py
+++ b/numpy/core/ma.py
@@ -55,6 +55,8 @@ class _MaskedPrintOption:
def __str__ (self):
return str(self._display)
+ __repr__ = __str__
+
#if you single index into a masked location you get this object.
masked_print_option = _MaskedPrintOption('--')
@@ -681,6 +683,8 @@ class MaskedArray (object):
# XXX: for the masked singleton? 2005-01-05 -- sasha
if self is masked:
return str(f)
+ # convert to object array to make filled work
+ self = self.astype(object)
else:
f = self.fill_value()
res = self.filled(f)