From ffcf529cd88e521aa593c5b57868b6a9353a1e26 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Sun, 10 May 2009 03:55:42 +0000 Subject: Backport reduceat bug-fix to 1.1 series. --- numpy/core/src/ufuncobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/core/src') diff --git a/numpy/core/src/ufuncobject.c b/numpy/core/src/ufuncobject.c index 87389e5ef..6a655987a 100644 --- a/numpy/core/src/ufuncobject.c +++ b/numpy/core/src/ufuncobject.c @@ -2926,7 +2926,7 @@ PyUFunc_Reduceat(PyUFuncObject *self, PyArrayObject *arr, PyArrayObject *ind, ptr = (intp *)ind->data; for(i=0; ibufptr[1] = loop->it->dataptr + \ - (*ptr)*loop->instrides; + (*ptr)*loop->steps[1]; if (loop->obj) { Py_XINCREF(*((PyObject **)loop->bufptr[1])); } @@ -2935,7 +2935,7 @@ PyUFunc_Reduceat(PyUFuncObject *self, PyArrayObject *arr, PyArrayObject *ind, mm = (i==nn-1 ? arr->dimensions[axis]-*ptr : \ *(ptr+1) - *ptr) - 1; if (mm > 0) { - loop->bufptr[1] += loop->instrides; + loop->bufptr[1] += loop->steps[1]; loop->bufptr[2] = loop->bufptr[0]; loop->function((char **)loop->bufptr, &mm, loop->steps, -- cgit v1.2.1