This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author WarrenWeckesser
Recipients WarrenWeckesser, gaoxinge, mark.dickinson, rhettinger, steven.daprano, taleinat, tim.peters
Date 2019-11-04.00:29:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAGzF1uc-+f9LYoiTtZf9wSSvVDoZ+qvz5M+WDMak0kqugxs9VQ@mail.gmail.com>
In-reply-to <1570616840.88.0.350995647145.issue38382@roundup.psfhosted.org>
Content
On 10/9/19, Mark Dickinson <report@bugs.python.org> wrote:
>
> Mark Dickinson <dickinsm@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.
>

A belated "thanks", Mark.  I wasn't aware of that, but it makes sense.

Warren

> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue38382>
> _______________________________________
>
History
Date User Action Args
2019-11-04 00:29:20WarrenWeckessersetrecipients: + WarrenWeckesser, tim.peters, rhettinger, mark.dickinson, taleinat, steven.daprano, gaoxinge
2019-11-04 00:29:20WarrenWeckesserlinkissue38382 messages
2019-11-04 00:29:19WarrenWeckessercreate