summaryrefslogtreecommitdiff
path: root/numpy/core/_internal.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2008-02-27 20:59:20 +0000
committerTravis Oliphant <oliphant@enthought.com>2008-02-27 20:59:20 +0000
commit984bd6ce8c464f921d273898a2546506778986a7 (patch)
tree5192ab50a1229550c7ec439812bf25cbb331a8df /numpy/core/_internal.py
parent2cb12ec9fb42b617a43561d16471fb4368cf2e86 (diff)
downloadnumpy-984bd6ce8c464f921d273898a2546506778986a7.tar.gz
Fix printing of complicated dtypes.
Diffstat (limited to 'numpy/core/_internal.py')
-rw-r--r--numpy/core/_internal.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/numpy/core/_internal.py b/numpy/core/_internal.py
index b6e153580..558d2fe93 100644
--- a/numpy/core/_internal.py
+++ b/numpy/core/_internal.py
@@ -79,7 +79,12 @@ def _usefields(adict, align):
def _array_descr(descriptor):
fields = descriptor.fields
if fields is None:
- return descriptor.str
+ subdtype = descriptor.subdtype
+ if subdtype is None:
+ return descriptor.str
+ else:
+ return (_array_descr(subdtype[0]), subdtype[1])
+
names = descriptor.names
ordered_fields = [fields[x] + (x,) for x in names]