[issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0

Tal Einat report at bugs.python.org
Fri Oct 11 17:36:49 EDT 2019


Tal Einat <taleinat at gmail.com> added the comment:

I'd certainly be surprised to have the order of zero and negative values in the input have such a dramatic effect on the result. It would make debugging these cases unnecessarily confusing and difficult. And I think it is indeed worth fixing, as these edge-cases are likely to come up of time when dealing with large amounts of data.

I'm +1 on Warren's latest suggestion for a fix.

P.S If we agree on this, either Warren should make the fix himself or we should mark it "newcomer friendly" and let a newcomer handle it.

----------
nosy: +taleinat

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38382>
_______________________________________


More information about the Python-bugs-list mailing list