summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/core/src/multiarray/convert.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/convert.c b/numpy/core/src/multiarray/convert.c
index e99bc3fe4..9e0c9fb60 100644
--- a/numpy/core/src/multiarray/convert.c
+++ b/numpy/core/src/multiarray/convert.c
@@ -21,6 +21,7 @@
#include "convert.h"
#include "array_coercion.h"
+#include "refcount.h"
int
fallocate(int fd, int mode, off_t offset, off_t len);
@@ -416,7 +417,7 @@ PyArray_FillWithScalar(PyArrayObject *arr, PyObject *obj)
descr, value);
if (PyDataType_REFCHK(descr)) {
- PyArray_Item_XDECREF(value, descr);
+ PyArray_ClearBuffer(descr, value, 0, 1, 1);
}
PyMem_FREE(value_buffer_heap);
return retcode;