summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorpierregm <pierregm@localhost>2008-07-18 00:45:23 +0000
committerpierregm <pierregm@localhost>2008-07-18 00:45:23 +0000
commitab911fc322d50ce9928b211954857cc56e7a1595 (patch)
tree38d0523ce8696a8401256a3ed6eb07b22eab2ceb /numpy
parent7a47bfa5a562f9bcd2baecba451bcd334bfe30ed (diff)
downloadnumpy-ab911fc322d50ce9928b211954857cc56e7a1595.tar.gz
* fixed a pb with printing flexible ndarrays with subdtypes
Diffstat (limited to 'numpy')
-rw-r--r--numpy/ma/core.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
index 118f8f6df..6de5e7ee4 100644
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -1824,7 +1824,11 @@ class MaskedArray(ndarray):
res = self._data.astype("|O8")
res[m] = f
else:
- res = self._data.astype([(n,'|O8') for n in names])
+ rdtype = [list(_) for _ in self.dtype.descr]
+ for r in rdtype:
+ r[1] = '|O8'
+ rdtype = [tuple(_) for _ in rdtype]
+ res = self._data.astype(rdtype)
for field in names:
np.putmask(res[field], m[field], f)
else: