diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2014-07-05 21:59:43 +0200 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2014-07-05 22:08:24 +0200 |
commit | 9c4d48c3c27584e8a555b5e55d1634089db7a01a (patch) | |
tree | c7235960f7d8985c817b67543add3b0df864884b /numpy | |
parent | ed88fa9615c43da364a641c741badd855729dd3c (diff) | |
download | numpy-9c4d48c3c27584e8a555b5e55d1634089db7a01a.tar.gz |
BUG: Add missing error incref in 1d indexing fallback
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/multiarray/mapping.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/mapping.c b/numpy/core/src/multiarray/mapping.c index 8fb3aa369..bf4851519 100644 --- a/numpy/core/src/multiarray/mapping.c +++ b/numpy/core/src/multiarray/mapping.c @@ -1668,6 +1668,8 @@ attempt_1d_fallback(PyArrayObject *self, PyObject *ind, PyObject *op) { PyObject *err = PyErr_Occurred(); PyArrayIterObject *self_iter = NULL; + + Py_INCREF(err); PyErr_Clear(); self_iter = (PyArrayIterObject *)PyArray_IterNew((PyObject *)self); @@ -1803,7 +1805,6 @@ array_assign_subscript(PyArrayObject *self, PyObject *ind, PyObject *op) /* * Deprecated case. The old boolean indexing seemed to have some * check to allow wrong dimensional boolean arrays in all cases. - * Note that it did *not* allow a wrong number of elements here. */ if (PyArray_NDIM(tmp_arr) > 1) { if (attempt_1d_fallback(self, indices[0].object, tmp_arr) < 0) { |