Live data from Hacker News

PEP 450: Adding A Statistics Module To The Standard Library

python.org

81–85 of 85 posts

Re: PEP 450: Adding A Statistics Module To The Standard Library

#82
post #4

Earlier quoted context omitted.

I think Pandas is a great candidate for inclusion in the stdlib if this ever happens - and hopefully, numpy/parts of scipy will also be thrown in :)

I think the idea is to include a small independent stats package not a full featured still developing third party. Any number of people need std dev easily and reliably available. If you need numpy on top of that, you know you do and can afford the effort. For 99% of my work numpy and the associated compilation overhead is unneeded - fits my brain, fits my needs

So let's amortize the cost of compiling and/or installing fast binaries by only relying on plain Python.

It would be great if there was a natural progression (and/or compat shims) for porting from this new stdlib library to NumPy[Py] (and/or from LibreOffice). (e.g. "Is it called 'cummean'")?

Re: PEP 450: Adding A Statistics Module To The Standard Library

#83

> For many people, installing numpy may be difficult or impossible. For example, people in corporate environments may have to go through a difficult, time-consuming process before being permitted to install third-party software. I do not regard this as a good justification for putting something in the standard library! If you don't have root access, use vitualenv (which you might want to do anyway) and install the pa…

Son, I hope you never have the displeasure of working in an enterprise environment.

First of all, as others mentioned, your personal machine runs on Windows so right off the bat there goes your instant virtualenv, pip install.

Even on the Unix app server, you're probably behind a firewall that's tight as a duck's ass so chances are you're downloading the tar ball and making the package yourself.

Third, wtf are you doing littering the app server with all these binaries? And what is Python? I'm sorry, no, rewrite this in Java, please.

If you do manage to convince your manager and the rest of your team that Python is not black magic, the first time numpy breaks or some small issue crops up or you have to migrate to a new server and reinstall numpy but now there's a new version and... GTFO of here with that black magic.

I agree with you, developing websites on your MacBook Pro there's no excuse not being able to install numpy. In the real world though, having basic necessities in stdlib does absolute wonders.

Re: PEP 450: Adding A Statistics Module To The Standard Library

#84
post #60

Earlier quoted context omitted.

Permutations and combinations already exist within the itertools module.

> Permutations and combinations already exist within the itertools module. Not exactly. Given argument lists, Itertools provides result lists (actually, iterators for that purpose) with the original elements permuted and combined, but doesn't provide numerical results for numerical arguments, as shown here: http://arachnoid.com/binomial_probability I was referring to permutation and combination mathematical functions…

Hmm. Python has default Bignum promotion so the naive N choose K implementation will not suffer from overflow. I guess it could be slow for large values, but how many casual users need to calculate N choose K for large N?

Re: PEP 450: Adding A Statistics Module To The Standard Library

#85

Earlier quoted context omitted.

I think the idea is to include a small independent stats package not a full featured still developing third party. Any number of people need std dev easily and reliably available. If you need numpy on top of that, you know you do and can afford the effort. For 99% of my work numpy and the associated compilation overhead is unneeded - fits my brain, fits my needs

So let's amortize the cost of compiling and/or installing fast binaries by only relying on plain Python. It would be great if there was a natural progression (and/or compat shims) for porting from this new stdlib library to NumPy[Py] (and/or from LibreOffice). (e.g. "Is it called 'cummean'")?

I guess that's the point of the stats-battery - pure python stats with no / minimal cost to migrate to numpy e.g.

  From stats import mean

  ...

  from numpy import mean
Post reply on HN