summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/multiarray/arrayobject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/arrayobject.c b/numpy/core/src/multiarray/arrayobject.c
index 2e69b25f6..145daa845 100644
--- a/numpy/core/src/multiarray/arrayobject.c
+++ b/numpy/core/src/multiarray/arrayobject.c
@@ -243,6 +243,7 @@ PyArray_CopyObject(PyArrayObject *dest, PyObject *src_object)
else {
if (PyArray_SIZE(dest) == 1) {
Py_DECREF(dtype);
+ Py_DECREF(src_object);
ret = PyArray_DESCR(dest)->f->setitem(src_object,
PyArray_DATA(dest), dest);
/* Unmask the value if necessary */