Mark Dickinson <dicki...@gmail.com> added the comment:
> In [20]: harmonic_mean([math.nan, 0]) > > Out[20]: 0 That one seems excusable, for the same sort of reasons that IEEE 754 specifies that hypot(nan, inf) is inf rather than nan. Similarly, sumSquare and sumAbs from IEEE 754-2008 specify that infinities take precedence over NaNs, on the basis that the result doesn't change if the nan is replaced with any non-nan value. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38382> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com