Author mark.dickinson
Recipients WarrenWeckesser, mark.dickinson, rhettinger, steven.daprano, tim.peters
Date 2019-10-09.10:27:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> 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.
Date User Action Args
2019-10-09 10:27:21mark.dickinsonsetrecipients: + mark.dickinson, tim.peters, rhettinger, steven.daprano, WarrenWeckesser
2019-10-09 10:27:20mark.dickinsonsetmessageid: <>
2019-10-09 10:27:20mark.dickinsonlinkissue38382 messages
2019-10-09 10:27:20mark.dickinsoncreate