summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/multiarray/ctors.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c
index a98116afe..f41ab1a4a 100644
--- a/numpy/core/src/multiarray/ctors.c
+++ b/numpy/core/src/multiarray/ctors.c
@@ -825,6 +825,7 @@ discover_dimensions(PyObject *s, int *maxndim, npy_intp *d, int check_it,
if ((e = PySequence_GetItem(s, 0)) == NULL) {
/* not a list */
*maxndim = 0;
+ *out_is_object = 1;
PyErr_Clear();
return 0;
}
@@ -844,6 +845,7 @@ discover_dimensions(PyObject *s, int *maxndim, npy_intp *d, int check_it,
if ((e = PySequence_GetItem(s, 0)) == NULL) {
/* not a list */
*maxndim = 0;
+ *out_is_object = 1;
PyErr_Clear();
return 0;
}