summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2009-05-10 03:55:42 +0000
committerTravis Oliphant <oliphant@enthought.com>2009-05-10 03:55:42 +0000
commitffcf529cd88e521aa593c5b57868b6a9353a1e26 (patch)
tree0b71b29cde711190399fc0167e4d6d9ed486af3f
parentac94091dc27d3d061b3e53fd975c26e42021ddac (diff)
downloadnumpy-maintenance/1.1.x.tar.gz
Backport reduceat bug-fix to 1.1 series.maintenance/1.1.x
-rw-r--r--numpy/core/src/ufuncobject.c4
1 files changed, 2 insertions, 2 deletions
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; i<nn; i++) {
loop->bufptr[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,