Skip to content

BUG: count_nonzero treats empty axis tuples strangely - #9881

Merged
charris merged 1 commit into
numpy:masterfrom
eric-wieser:fix-count_nonzero-axis
Oct 18, 2017
Merged

charris merged 1 commit into
numpy:masterfrom
eric-wieser:fix-count_nonzero-axis

Conversation

@eric-wieser

Copy link
Copy Markdown
Member

Fixes #9728

This bug was introduced with the axis keyword in #7177, likely as a misguided optimization.

Fixes numpy#9728

This bug was introduced with the `axis` keyword in numpy#7177, as a misguided optimization.
@charris

charris commented Oct 18, 2017

Copy link
Copy Markdown
Member

Gotta wonder if axis=() actually makes sense. OTOH, is already seems to be recognized by sum.

@charris

charris commented Oct 18, 2017

Copy link
Copy Markdown
Member

Thanks Eric.

@eric-wieser

Copy link
Copy Markdown
Member Author

Turns out this fixed a regression, restoring the behavior to pre- 3626d0c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants