[issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0
Warren Weckesser
report at bugs.python.org
Tue Oct 8 20:32:44 EDT 2019
Warren Weckesser <warren.weckesser at gmail.com> added the comment:
One more case where the "early out" produces a result that seems wrong:
In [20]: harmonic_mean([math.nan, 0])
Out[20]: 0
Anyone who didn't know about the "early out" behavior would probably expect the result to be NAN.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38382>
_______________________________________
More information about the Python-bugs-list
mailing list