summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wiebe <mwwiebe@gmail.com>2011-08-19 16:47:07 -0700
committerCharles Harris <charlesr.harris@gmail.com>2011-08-27 07:26:57 -0600
commitc3fafa497c016303ef5f861d70ff3947111d2da8 (patch)
treeb0c72377431657a028c9ceec460c0cb63a49438a
parent1848be621596d874b9e09afa1f7dd8175006980d (diff)
downloadnumpy-c3fafa497c016303ef5f861d70ff3947111d2da8.tar.gz
BUG: ufunc: Missed a small update for the unitless reduction case
-rw-r--r--numpy/core/src/multiarray/reduction.h2
-rw-r--r--numpy/core/src/umath/ufunc_object.c4
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;