Skip to content

Commit

Permalink
BUG: ufunc: Missed a small update for the unitless reduction case
Browse files Browse the repository at this point in the history
  • Loading branch information
mwiebe authored and charris committed Aug 27, 2011
1 parent 1848be6 commit c3fafa4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion numpy/core/src/multiarray/reduction.h
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions numpy/core/src/umath/ufunc_object.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c3fafa4

Please sign in to comment.