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

MRAB python at mrabarnett.plus.com
Tue Aug 6 04:26:33 CEST 2013


On 06/08/2013 03:10, Steven D'Aprano wrote:
> On 05/08/13 12:59, Stephen J. Turnbull wrote:
>> I couldn't find a list of functions proposed for inclusion in the
>> statistics package in the pre-PEP, only lists of functions in other
>> implementations that "suggest" the content of this package.  Did I
>> miss something?
>
> Not really. I haven't seen the full public API of modules listed in other PEPs, so I didn't include it in mine. Perhaps I didn't look hard enough.
>
> Here's the current public API:
>
> - add_partial           Utility for performing high-precision sums.
> - mean                  Arithmetic mean (average) of data.
> - median                Median (middle value) of data.
> - median.high           Median, taking the high value in ties.
> - median.low            Median, taking the low value in ties.
> - median.grouped        Median, adjusting for grouped data.
> - mode                  Mode (most common value) of data.
> - mode.collate          Helper for mode.
> - mode.extract          Helper for mode.
> - pstdev                Population standard deviation of data.
> - pvariance             Population variance of data.

How about "popstdev" and "popvariance" instead? The "p" is not as clear
to me as "pop".

> - StatisticsError       Exception for statistics errors.
> - stdev                 Sample standard deviation of data.
> - sum                   High-precision sum of data.
> - variance              Sample variance of data.
>
[snip]



More information about the Python-ideas mailing list