summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2011-03-07 22:29:29 -0700
committerCharles Harris <charlesr.harris@gmail.com>2011-03-07 22:30:47 -0700
commit9e845494355a7bb6c6548f0f48fa83485999a460 (patch)
treeb68a784bfd73be580bc0bc8d3e2ed475ef6a812a /numpy
parent60adb1ac9fe688184973a02e8bce552d70d087f4 (diff)
downloadnumpy-9e845494355a7bb6c6548f0f48fa83485999a460.tar.gz
Make a failed sequence access error set the object creation flag.
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;
}