summaryrefslogtreecommitdiff
path: root/numpy/core/src/arraymethods.c
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-06-24 23:21:32 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-06-24 23:21:32 +0000
commit645875e245d43678def9916cf23510453670afda (patch)
tree5840c93f4ba26fde9a5094753535a1358e003ff7 /numpy/core/src/arraymethods.c
parentb29933635ef46e3b88b4d31cb8d830fa2401c04f (diff)
downloadnumpy-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.c8
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);
}