diff options
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); } |