summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2016-09-05 20:48:28 +0200
committerPauli Virtanen <pav@iki.fi>2017-01-19 22:12:47 +0100
commit51e3a073448fe0cc59f71f0ecc78868648d0a5e6 (patch)
treea94372396e0552b97c45f89470c3eac630dde048
parented46b9e3c20ace62af8d5315e1c9729222c12200 (diff)
downloadnumpy-51e3a073448fe0cc59f71f0ecc78868648d0a5e6.tar.gz
BUG: core: fix use of wrong output array in iterator_loop
These can differ if the iterator decides to make temporary copies of output arrays.
-rw-r--r--numpy/core/src/umath/ufunc_object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/src/umath/ufunc_object.c b/numpy/core/src/umath/ufunc_object.c
index 62024d2e3..52e8eab42 100644
--- a/numpy/core/src/umath/ufunc_object.c
+++ b/numpy/core/src/umath/ufunc_object.c
@@ -1482,7 +1482,7 @@ iterator_loop(PyUFuncObject *ufunc,
baseptrs[i] = PyArray_BYTES(op_it[i]);
}
for (i = nin; i < nop; ++i) {
- baseptrs[i] = PyArray_BYTES(op[i]);
+ baseptrs[i] = PyArray_BYTES(op_it[i]);
}
if (NpyIter_ResetBasePointers(iter, baseptrs, NULL) != NPY_SUCCEED) {
NpyIter_Deallocate(iter);