diff options
author | Travis Oliphant <oliphant@enthought.com> | 2009-05-10 03:59:34 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2009-05-10 03:59:34 +0000 |
commit | bc72fdd41b35b033c238b5f86cdded2ad5b5591e (patch) | |
tree | 51400cf523c40a6405072787f47e36f120a82b20 | |
parent | 581ef304409984a2ebb56d0eae55c283438fd794 (diff) | |
download | numpy-bc72fdd41b35b033c238b5f86cdded2ad5b5591e.tar.gz |
Back-port bug-fix to reduceat (r6977) to 1.3.x branch.
-rw-r--r-- | numpy/core/src/umath_ufunc_object.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/src/umath_ufunc_object.inc b/numpy/core/src/umath_ufunc_object.inc index 3447a1d2b..c5b45e60f 100644 --- a/numpy/core/src/umath_ufunc_object.inc +++ b/numpy/core/src/umath_ufunc_object.inc @@ -2848,7 +2848,7 @@ PyUFunc_Reduceat(PyUFuncObject *self, PyArrayObject *arr, PyArrayObject *ind, while (loop->index < loop->size) { ptr = (intp *)ind->data; for (i = 0; i < nn; i++) { - loop->bufptr[1] = loop->it->dataptr + (*ptr)*loop->instrides; + loop->bufptr[1] = loop->it->dataptr + (*ptr)*loop->steps[1]; if (loop->obj) { Py_XINCREF(*((PyObject **)loop->bufptr[1])); } @@ -2856,7 +2856,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, loop->funcdata); |