diff options
-rw-r--r-- | numpy/core/src/multiarray/mapping.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/mapping.c b/numpy/core/src/multiarray/mapping.c index 5cc3c9a2f..81bd7c585 100644 --- a/numpy/core/src/multiarray/mapping.c +++ b/numpy/core/src/multiarray/mapping.c @@ -1044,6 +1044,7 @@ array_boolean_subscript(PyArrayObject *self, if (!PyArray_CheckExact(self)) { PyArrayObject *tmp = ret; + Py_INCREF(dtype); ret = (PyArrayObject *)PyArray_NewFromDescr(Py_TYPE(self), dtype, 1, &size, PyArray_STRIDES(ret), PyArray_BYTES(ret), 0, (PyObject *)self); |