Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: fix internal divide-by-zero warnings #4498

Merged
merged 4 commits into from
Jun 13, 2023

Conversation

neutrinoceros
Copy link
Member

PR Summary

I am (perhaps naively) thinking this may be a low hanging fruit, let's see how many tests actually raise this warning and if they're fixable.

@neutrinoceros neutrinoceros added tests: running tests Issues with the test setup enhancement Making something better labels Jun 10, 2023
@neutrinoceros
Copy link
Member Author

This turned out very light-weighted, so we might as well aim it to the next bugfix release

@neutrinoceros neutrinoceros added this to the 4.2.1 milestone Jun 10, 2023
Copy link
Member

@matthewturk matthewturk left a comment

Choose a reason for hiding this comment

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

Looks good to me. I always feel like the 'replace this value with this other value' operation in numpy has a purpose-specific function associated with it, but I can't find one that does this, so.

@neutrinoceros neutrinoceros marked this pull request as ready for review June 10, 2023 17:40
@neutrinoceros neutrinoceros changed the title TST: treat zero-division warnings as errors BUG: fix internal divide-by-zero warnings Jun 10, 2023
@neutrinoceros
Copy link
Member Author

I don't know of one either.

@neutrinoceros neutrinoceros merged commit 4cf9e8d into yt-project:main Jun 13, 2023
12 checks passed
@neutrinoceros neutrinoceros deleted the no_zero_div branch June 13, 2023 07:53
meeseeksmachine pushed a commit to meeseeksmachine/yt that referenced this pull request Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug enhancement Making something better tests: running tests Issues with the test setup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants