Skip to content

bpo-38382: Fix premature return on ZeroDivisionError in statistics.harmonic_mean - #16601

Closed
WarrenWeckesser wants to merge 2 commits into
python:masterfrom
WarrenWeckesser:fix-issue-38382
Closed

WarrenWeckesser wants to merge 2 commits into
python:masterfrom
WarrenWeckesser:fix-issue-38382

Conversation

@WarrenWeckesser

@WarrenWeckesser WarrenWeckesser commented Oct 6, 2019 •

Copy link
Copy Markdown
  • Check for any negative values before attempting to compute the harmonic mean.
  • The private function _fail_neg is no longer used, so remove it.

https://bugs.python.org/issue38382

…rmonic_mean

* Check for any negative values before attempting to compute the harmonic mean.
* The private function _fail_neg is no longer used, so remove it.
@the-knights-who-say-ni

Copy link
Copy Markdown

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

CLA Missing

Our records indicate the following people have not signed the CLA:

@WarrenWeckesser

For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@WarrenWeckesser

Copy link
Copy Markdown
Author

I signed the CLA after submitting this PR.

@corona10
corona10 requested a review from rhettinger October 6, 2019 04:54
@corona10

corona10 commented Oct 6, 2019

Copy link
Copy Markdown
Member

@WarrenWeckesser Thanks for the contribution. Please add news through blurb

@rhettinger rhettinger self-assigned this Oct 6, 2019
@rhettinger rhettinger removed their assignment Oct 9, 2019

@stevendaprano stevendaprano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think this should be merged until the discussion on b.p.o. comes to a definite conclusion about the action to take.

@WarrenWeckesser

Copy link
Copy Markdown
Author

@stevendaprano I agree!

@WarrenWeckesser

Copy link
Copy Markdown
Author

Closing for now. The required action (if any) is under discussion. If there is a change, it almost certainly won't be the change in this PR in its current form.

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.

6 participants