summaryrefslogtreecommitdiff
path: root/numpy/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/src')
-rw-r--r--numpy/core/src/multiarraymodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/core/src/multiarraymodule.c b/numpy/core/src/multiarraymodule.c
index 2b826ec1e..7e0ebc9fe 100644
--- a/numpy/core/src/multiarraymodule.c
+++ b/numpy/core/src/multiarraymodule.c
@@ -1291,6 +1291,7 @@ PyArray_Clip(PyArrayObject *self, PyObject *min, PyObject *max, PyArrayObject *o
else
oflags = NPY_CARRAY;
oflags |= NPY_UPDATEIFCOPY | NPY_FORCECAST;
+ Py_INCREF(indescr);
newout = (NPY_AO*)PyArray_FromArray(out, indescr, oflags);
if (newout == NULL) goto fail;
}