summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-08-17 18:19:27 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-08-17 18:19:27 +0000
commit647505516a3adb0c30d84fa2219cf33870cb0d75 (patch)
tree59a0ee6ec61bedb145573421aa790848e8640532
parenta764a203bbe4b26c25457f86ae902e248998bda6 (diff)
downloadnumpy-647505516a3adb0c30d84fa2219cf33870cb0d75.tar.gz
Alter the naming of un-specified fields to start at 0
-rw-r--r--numpy/core/src/multiarraymodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/src/multiarraymodule.c b/numpy/core/src/multiarraymodule.c
index 72bdd10db..9cad7af92 100644
--- a/numpy/core/src/multiarraymodule.c
+++ b/numpy/core/src/multiarraymodule.c
@@ -4239,7 +4239,7 @@ _convert_from_array_descr(PyObject *obj)
/* 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 @@ _convert_from_list(PyObject *obj, int align)
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);