Skip to content

Conversation

@max-sixty
Copy link
Collaborator

@max-sixty max-sixty commented Aug 22, 2020

  • Closes Don't warn on empty reductions #3811
  • Tests added
  • Passes isort . && black . && mypy . && flake8
  • User visible changes (including notable bug fixes) are documented in whats-new.rst

Is this the right approach? Or should we be using np.errstate machinery?

@mathause
Copy link
Collaborator

I think this thread suggests to use warning: numpy/numpy#10709

@max-sixty max-sixty marked this pull request as ready for review August 30, 2020 02:18
Copy link
Collaborator

@keewis keewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but the linter-enforced else clause seems a bit strange to me

@max-sixty max-sixty merged commit 8950993 into pydata:master Sep 2, 2020
@max-sixty max-sixty deleted the numpy-warning branch September 2, 2020 22:26
@max-sixty
Copy link
Collaborator Author

LGTM, but the linter-enforced else clause seems a bit strange to me

Yeah, I think it makes sense the context of the function alone — it doesn't know that the values are limited to the two parameterizations. Though this fix trades one error for another, in the end.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't warn on empty reductions

3 participants