diff options
author | Mark Wiebe <mwwiebe@gmail.com> | 2011-08-19 16:47:07 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2011-08-27 07:26:57 -0600 |
commit | c3fafa497c016303ef5f861d70ff3947111d2da8 (patch) | |
tree | b0c72377431657a028c9ceec460c0cb63a49438a /numpy | |
parent | 1848be621596d874b9e09afa1f7dd8175006980d (diff) | |
download | numpy-c3fafa497c016303ef5f861d70ff3947111d2da8.tar.gz |
BUG: ufunc: Missed a small update for the unitless reduction case
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/multiarray/reduction.h | 2 | ||||
-rw-r--r-- | numpy/core/src/umath/ufunc_object.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/src/multiarray/reduction.h b/numpy/core/src/multiarray/reduction.h index 9de44de61..761497be1 100644 --- a/numpy/core/src/multiarray/reduction.h +++ b/numpy/core/src/multiarray/reduction.h @@ -43,7 +43,7 @@ typedef int (PyArray_AssignReduceUnitFunc)(PyArrayObject *result, * npy_intp count = *countptr; * * // Skip any first-visit elements - * if (NpyIter_IsFirstVisit(iter, 1)) { + * if (NpyIter_IsFirstVisit(iter, 0)) { * if (stride0 == 0) { * --count; * --skip_first_count; diff --git a/numpy/core/src/umath/ufunc_object.c b/numpy/core/src/umath/ufunc_object.c index a86c67c2d..643e1d6f0 100644 --- a/numpy/core/src/umath/ufunc_object.c +++ b/numpy/core/src/umath/ufunc_object.c @@ -2881,7 +2881,7 @@ PyUFunc_Reduce(PyUFuncObject *self, PyArrayObject *arr, PyArrayObject *out, npy_intp count = *count_ptr; /* Skip any first-visit elements */ - if (NpyIter_IsFirstVisit(iter, 1)) { + if (NpyIter_IsFirstVisit(iter, 0)) { if (stride[0] == 0) { --count; --skip_first_count; @@ -2933,7 +2933,7 @@ PyUFunc_Reduce(PyUFuncObject *self, PyArrayObject *arr, PyArrayObject *out, npy_intp count = *count_ptr; /* Skip any first-visit elements */ - if (NpyIter_IsFirstVisit(iter, 1)) { + if (NpyIter_IsFirstVisit(iter, 0)) { if (stride[0] == 0) { --count; --skip_first_count; |