[Python-ideas] Pre-PEP: adding a statistics module to Python
Andrew Barnert
abarnert at yahoo.com
Tue Aug 6 05:14:15 CEST 2013
On Aug 5, 2013, at 19:26, MRAB <python at mrabarnett.plus.com> wrote:
> 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".
It took me a second to figure out how to parse "popstdev" into the correct three words.
I'm guessing that will be a one-time cost that most people who need the function will never even notice... But I think the same may be true for learning what pstdev means.
>
>> - StatisticsError Exception for statistics errors.
>> - stdev Sample standard deviation of data.
>> - sum High-precision sum of data.
>> - variance Sample variance of data.
> [snip]
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
More information about the Python-ideas
mailing list