Skip to content

Commit

Permalink
Alter the naming of un-specified fields to start at 0
Browse files Browse the repository at this point in the history
  • Loading branch information
teoliphant committed Aug 17, 2006
1 parent a764a20 commit 6475055
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions numpy/core/src/multiarraymodule.c
Expand Up @@ -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.
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 6475055

Please sign in to comment.