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

gaoxinge report at bugs.python.org
Tue Oct 29 23:10:26 EDT 2019


gaoxinge <gaoxx5 at gmail.com> added the comment:

The document https://github.com/WarrenWeckesser/cpython/blob/master/Lib/statistics.py#L389 in `harmonic_mean` is out-dated. I think we can simply follow the wiki:

- [arithemic mean](https://en.wikipedia.org/wiki/Arithmetic_mean)
- [geometric mean](https://en.wikipedia.org/wiki/Geometric_mean)
- [harmonic mean](https://en.wikipedia.org/wiki/Harmonic_mean)

----------

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


More information about the Python-bugs-list mailing list