[Python-ideas] Pre-PEP: adding a statistics module to Python

Stephen J. Turnbull stephen at xemacs.org
Mon Aug 5 05:22:05 CEST 2013


Sorry for the self-followup, but hopefully I can catch this before
wasting too many people's time responding to a stupid and mostly
unimportant error.

Stephen J. Turnbull writes:

 > I can't agree with your rationale for inclusion based on the
 > imprecision in math.sum.

Oops, brain bubble.  There is no math.sum.  The argument applies with
s/math.sum/builtin sum/.)

 > Without having actually thought about it[1], I suspect
 > to think that replacing math.sum with the proposed statistics.sum,

This should read "adding math.sum with the implementation of the
proposed statistics.sum".

 > adding mean and standard_deviation functions to math,

OK.

 > and moving the existing math.sum to math.faster_sum

Delete this.

 > would be sufficient to address the real needs here.  (Of course,
 > math.faster_sum 

s/math.faster_sum/builtin sum/ here.

 > should be documented to be avoided in applications where
 > ill-conditioned data might arise.


More information about the Python-ideas mailing list