[Numpy-svn] r4826 - trunk/numpy/core
numpy-svn at scipy.org
numpy-svn at scipy.org
Wed Feb 27 15:59:24 EST 2008
Author: oliphant
Date: 2008-02-27 14:59:20 -0600 (Wed, 27 Feb 2008)
New Revision: 4826
Modified:
trunk/numpy/core/_internal.py
Log:
Fix printing of complicated dtypes.
Modified: trunk/numpy/core/_internal.py
===================================================================
--- trunk/numpy/core/_internal.py 2008-02-27 19:37:11 UTC (rev 4825)
+++ trunk/numpy/core/_internal.py 2008-02-27 20:59:20 UTC (rev 4826)
@@ -79,8 +79,13 @@
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]
result = []
More information about the Numpy-svn
mailing list