[Numpy-svn] r2997 - trunk/numpy/core/src
numpy-svn at scipy.org
numpy-svn at scipy.org
Fri Aug 11 16:16:45 EDT 2006
Author: oliphant
Date: 2006-08-11 15:16:43 -0500 (Fri, 11 Aug 2006)
New Revision: 2997
Modified:
trunk/numpy/core/src/arraymethods.c
Log:
Allow .astype method to work on data-types with fields.
Modified: trunk/numpy/core/src/arraymethods.c
===================================================================
--- trunk/numpy/core/src/arraymethods.c 2006-08-11 07:09:36 UTC (rev 2996)
+++ trunk/numpy/core/src/arraymethods.c 2006-08-11 20:16:43 UTC (rev 2997)
@@ -530,6 +530,9 @@
Py_XDECREF(descr);
return obj;
}
+ if (descr->names != NULL) {
+ return PyArray_FromArray(self, descr, 0);
+ }
return _ARET(PyArray_CastToType(self, descr, 0));
}
More information about the Numpy-svn
mailing list