diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-06-24 23:21:32 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-06-24 23:21:32 +0000 |
commit | 645875e245d43678def9916cf23510453670afda (patch) | |
tree | 5840c93f4ba26fde9a5094753535a1358e003ff7 /numpy/core/src/arraymethods.c | |
parent | b29933635ef46e3b88b4d31cb8d830fa2401c04f (diff) | |
download | numpy-645875e245d43678def9916cf23510453670afda.tar.gz |
Allow void-type scalars to be sequences if they have fields.
Diffstat (limited to 'numpy/core/src/arraymethods.c')
-rw-r--r-- | numpy/core/src/arraymethods.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/numpy/core/src/arraymethods.c b/numpy/core/src/arraymethods.c index d2df1c66b..84ffaad91 100644 --- a/numpy/core/src/arraymethods.c +++ b/numpy/core/src/arraymethods.c @@ -411,13 +411,7 @@ static char doc_tolist[] = "m.tolist(). Copy the data portion of the array"\ static PyObject * array_tolist(PyArrayObject *self, PyObject *args) { - if (!PyArg_ParseTuple(args, "")) return NULL; - if (self->nd <= 0) { - PyErr_SetString(PyExc_ValueError, - "can't convert a 0-d array to a list"); - return NULL; - } - + if (!PyArg_ParseTuple(args, "")) return NULL; return PyArray_ToList(self); } |