summaryrefslogtreecommitdiff
path: root/numpy/core/src
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2023-03-27 09:55:35 +0300
committermattip <matti.picus@gmail.com>2023-03-27 09:55:35 +0300
commit47df67bb6c83d68c3254b69a44426b02d3f24caa (patch)
treed4f21798b4535b99afb7ce0bc6d8281c0ef6f7d8 /numpy/core/src
parent7761175e3df8ef30b09e2d71113251cd2de8f6f9 (diff)
downloadnumpy-47df67bb6c83d68c3254b69a44426b02d3f24caa.tar.gz
BUG: in the fastest path form ufunc.at, properly increment args[2]
Diffstat (limited to 'numpy/core/src')
-rw-r--r--numpy/core/src/umath/ufunc_object.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/numpy/core/src/umath/ufunc_object.c b/numpy/core/src/umath/ufunc_object.c
index a5e8f4cbe..d4aced05f 100644
--- a/numpy/core/src/umath/ufunc_object.c
+++ b/numpy/core/src/umath/ufunc_object.c
@@ -5935,6 +5935,9 @@ trivial_at_loop(PyArrayMethodObject *ufuncimpl, NPY_ARRAYMETHOD_FLAGS flags,
res = ufuncimpl->contiguous_indexed_loop(
context, args, inner_size, steps, NULL);
+ if (args[2] != NULL) {
+ args[2] += (*inner_size) * steps[2];
+ }
} while (res == 0 && iter->outer_next(iter->outer));
if (res == 0 && !(flags & NPY_METH_NO_FLOATINGPOINT_ERRORS)) {