[issue39218] Assertion failure when calling statistics.variance() on a float32 Numpy array

Raymond Hettinger report at bugs.python.org
Fri Aug 20 20:41:40 EDT 2021


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

Removing the assertion and implementing Steven's idea seems like the best way to go:

    sum((y:=(x-c)) * y for x in data)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39218>
_______________________________________


More information about the Python-bugs-list mailing list