summaryrefslogtreecommitdiff
path: root/numpy/lib/_iotools.py
diff options
context:
space:
mode:
authorpierregm <pierregm@localhost>2010-09-13 12:34:37 +0000
committerpierregm <pierregm@localhost>2010-09-13 12:34:37 +0000
commit7213c5d804412b1ab6f23c6419ba836865af517a (patch)
treec8cfae516fffc5eeffbbbebdc4fb929a0483aec7 /numpy/lib/_iotools.py
parenta70f5718a6199919e5bddf4a7daa032ae80c6779 (diff)
downloadnumpy-7213c5d804412b1ab6f23c6419ba836865af517a.tar.gz
* fixed 'flatten_dtype' to support fields w/ titles (bug #1591). Thx to Stefan vdW for the fix.
* added a unittest for flatten_dtype
Diffstat (limited to 'numpy/lib/_iotools.py')
-rw-r--r--numpy/lib/_iotools.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/_iotools.py b/numpy/lib/_iotools.py
index c9d81048f..451f0f610 100644
--- a/numpy/lib/_iotools.py
+++ b/numpy/lib/_iotools.py
@@ -132,8 +132,8 @@ def flatten_dtype(ndtype, flatten_base=False):
else:
types = []
for field in names:
- (typ, _) = ndtype.fields[field]
- flat_dt = flatten_dtype(typ, flatten_base)
+ info = ndtype.fields[field]
+ flat_dt = flatten_dtype(info[0], flatten_base)
types.extend(flat_dt)
return types