[Numpy-svn] r3033 - trunk/numpy/core/src

numpy-svn at scipy.org numpy-svn at scipy.org
Thu Aug 17 13:19:29 CDT 2006


Author: oliphant
Date: 2006-08-17 13:19:27 -0500 (Thu, 17 Aug 2006)
New Revision: 3033

Modified:
   trunk/numpy/core/src/multiarraymodule.c
Log:
Alter the naming of un-specified fields to start at 0

Modified: trunk/numpy/core/src/multiarraymodule.c
===================================================================
--- trunk/numpy/core/src/multiarraymodule.c	2006-08-17 07:53:01 UTC (rev 3032)
+++ trunk/numpy/core/src/multiarraymodule.c	2006-08-17 18:19:27 UTC (rev 3033)
@@ -4239,7 +4239,7 @@
 
 /* a list specifying a data-type can just be
    a list of formats.  The names for the fields
-   will default to f1, f2, f3, and so forth.
+   will default to f0, f1, f2, and so forth.
 
    or it can be an array_descr format string -- in which case
    align must be 0.  
@@ -4272,7 +4272,7 @@
 	fields = PyDict_New();
 	for (i=0; i<n; i++) {
 		tup = PyTuple_New(2);
-		key = PyString_FromFormat("f%d", i+1);
+		key = PyString_FromFormat("f%d", i);
 		ret = PyArray_DescrConverter(PyList_GET_ITEM(obj, i), &conv);
 		if (ret == PY_FAIL) {
 			Py_DECREF(tup);



More information about the Numpy-svn mailing list