[Python-ideas] Pre-PEP: adding a statistics module to Python
Steven D'Aprano
steve at pearwood.info
Sat Aug 3 09:10:58 CEST 2013
On 03/08/13 08:52, Andrew Barnert wrote:
>> As Steven pointed out, numpy/scipy are best of breed in the Python
>> ecosystem, but they're too "advanced" for inclusion in the standard
>> library. There's room for a standard implementation, but the module
>> wouldn't be complex enough to require years of development outside the
>> standard library.
>
> Years of development, no. But a few months on PyPI (with people pointing to it from places like python-list and StackOverflow) would capture a lot wider experience and testing than just a discussion on this list.
I have had a similar (but much more extensive) module on PyPy for 30+ months, and although there have been a reasonable number of downloads, I've had very little feedback.
https://pypi.python.org/pypi/stats/
The only negative feedback I've received was an extended argument that circular_mean is invalid, never mind what the mathematicians say. I do not accept that claim.
(In short, the mean of (say) 10° and 350° is 180° which is pointing in the wrong direction; circular_mean returns 0° which is probably what you want. Google for "mean of circular quantities" if you want to know more.)
> Also, if it's reasonably possible to make the implementation work for 3.0-3.3 (or even 2.6-3.3) a PyPI module will remain useful as a quasi-official backport even after acceptance in the stdlib.
I am happy to target 3.3 and keep it on PyPI; I'll look into backporting to previous versions.
--
Steven
More information about the Python-ideas
mailing list