Author David MacIver
Recipients David MacIver
Date 2015-09-19.11:40:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The following code produces an OverflowError:

import statistics
statistics.mean([8.988465674311579e+307, 8.98846567431158e+307])

The error is:

  File "/home/david/.pyenv/versions/3.5.0/lib/python3.5/", line 293, in mean
    return _sum(data)/n
  File "/home/david/.pyenv/versions/3.5.0/lib/python3.5/", line 184, in _sum
    return T(total)
  File "/home/david/.pyenv/versions/3.5.0/lib/python3.5/", line 291, in __float__
    return self.numerator / self.denominator
OverflowError: integer division result too large for a float

If this is intended behaviour then it is not documented: only specifies that it may raise StatisticsError.
Date User Action Args
2015-09-19 11:40:40David MacIversetrecipients: + David MacIver
2015-09-19 11:40:40David MacIversetmessageid: <>
2015-09-19 11:40:40David MacIverlinkissue25177 messages
2015-09-19 11:40:39David MacIvercreate