Skip to content

Commit

Permalink
BUG: Fixed reference count bug where scalar value assignment by field…
Browse files Browse the repository at this point in the history
… to an array would increment the reference count of the scalar.
  • Loading branch information
cfarrow authored and charris committed Oct 2, 2011
1 parent be52978 commit 3a7e61c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions numpy/core/src/multiarray/arrayobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 3a7e61c

Please sign in to comment.