[New-bugs-announce] [issue28111] geometric_mean can raise OverflowError when checking for inf

Steven D'Aprano report at bugs.python.org
Mon Sep 12 22:20:33 EDT 2016


New submission from Steven D'Aprano:

>>> statistics.geometric_mean([0.7 for _ in range(5000)])
Traceback (most recent call last):
  File "/Users/mdickinson/Python/cpython-git/Lib/statistics.py", line 362, in float_nroot
    isinfinity = math.isinf(x)
OverflowError: int too large to convert to float

See #27975 and #27181

----------
assignee: steven.daprano
components: Library (Lib)
messages: 276149
nosy: haypo, mark.dickinson, steven.daprano
priority: normal
severity: normal
status: open
title: geometric_mean can raise OverflowError when checking for inf
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28111>
_______________________________________


More information about the New-bugs-announce mailing list