Earlier quoted context omitted.
numpy is quite portable, I am not sure what you mean by not nearly portable enough. The reason why you can't do pip install numpy is pip's fault, there is nothing that numpy can do to make that work. Note that easy_install numpy does work on windows (without the need for a C compiler).
the problems I have had with numpy are endless. Usually I'll just prefer to write my own, because it's quicker. if you have tried to get numpy running on a cloud machine you'll know what I'm talking about. basically you will have to know how to compile from source, know some gcc, etc. the last time I tried to get it running I promised myself never to use numpy again.
PEP 450: Adding A Statistics Module To The Standard Library
51–60 of 85 posts
Re: PEP 450: Adding A Statistics Module To The Standard Library
#52Earlier quoted context omitted.
Agreed. I'm studying statistics at the moment and I'm continually reminded of how easy it is to choose the wrong model / distribution and be incorrect because of some non-obvious and technical reason. For example, just the other day, I wanted to use the binomial distribution to solve a problem. To use this distribution, the trials must be independent of one another. In that particular problem, there was a subtle cond…
> Statistics is way too easy to break to be used naively. Fair enough, but the same argument could be made about using an unskewed standard distribution on non-symmetrical datasets, a common error even among people who should know better. I think binomial functions should be included, on the ground that they're very useful and their probability of misuse is only equal to the continuous statistical forms, not more so.
I think having a basic stats module always handy would be very convenient.
Re: PEP 450: Adding A Statistics Module To The Standard Library
#53Earlier quoted context omitted.
> Statistics is way too easy to break to be used naively. Fair enough, but the same argument could be made about using an unskewed standard distribution on non-symmetrical datasets, a common error even among people who should know better. I think binomial functions should be included, on the ground that they're very useful and their probability of misuse is only equal to the continuous statistical forms, not more so.
Hell, sometimes they use a dictionary when they should be using a list. Almost everything can be used wrongly by a begginer, which doesn't mean it shouldn't be there. I think having a basic stats module always handy would be very convenient.
Re: PEP 450: Adding A Statistics Module To The Standard Library
#54Earlier quoted context omitted.
There is room for improvement, and it gets improved all the time (e.g. openblas is a recent contender). LAPACK is essentially an API for linear algebra, which is what allowed people to improve implementations and to benefit from them in older programs. Think of it as the C library of numerical computing.
I'm confused how a library written in Fortran 90 can be called "the C library of numerical computing".
Re: PEP 450: Adding A Statistics Module To The Standard Library
#55Earlier quoted context omitted.
numpy has all sorts of awful C bindings which make it less than versatile in environments where you want pure Python. It's great from a performance point of view, but horrible for compatibility. Google App Engine used to suffer because of this (more specifically, it still only restricts your runtime to pure Python, but now you can import numpy at least). I believe the PyPy folks have also had their own set of struggl…
How does that work for SQLite 3, which _is_ part of Python library? I would actually prefer to have numpy included before those statistics functions.
I have never used numpy on GAE, but I would suspect some of it is not enabled for those reasons.
Re: PEP 450: Adding A Statistics Module To The Standard Library
#56Re: PEP 450: Adding A Statistics Module To The Standard Library
#57It's not a terrible idea to support the absolute basics like mean & variance, but anything beyond that (particularly things like models or tests) is not a good idea for a standard library. Once you hit even something simple like a linear regression you have issues of how to represent missing or discrete variables, handling colinearity, or whether to do online or batch modes which can give different results. Tests in…
...how to represent missing or discrete variables...
Don't. Just say no. Just give me the simple easy stuff. Most of us will be fine, and everyone else will know they need something better and won't bother.Re: PEP 450: Adding A Statistics Module To The Standard Library
#58Earlier quoted context omitted.
> Statistics is way too easy to break to be used naively. Fair enough, but the same argument could be made about using an unskewed standard distribution on non-symmetrical datasets, a common error even among people who should know better. I think binomial functions should be included, on the ground that they're very useful and their probability of misuse is only equal to the continuous statistical forms, not more so.
Hell, sometimes they use a dictionary when they should be using a list. Almost everything can be used wrongly by a begginer, which doesn't mean it shouldn't be there. I think having a basic stats module always handy would be very convenient.
I absolutely agree. My only point was that these tools are sometimes misapplied, not at all to argue that they shouldn't be readily available. They should be.
Re: PEP 450: Adding A Statistics Module To The Standard Library
#59Just out of curiosity, I submitted this yesterday: https://news.ycombinator.com/item?id=6190603 The URL was http://www.python.org/dev/peps/pep-0450/ While this is http://www.python.org/dev/peps/pep-0450 That is, exactly the same except for a trailing slash. Doesn't the deduplication algorithm handle this case?
Re: PEP 450: Adding A Statistics Module To The Standard Library
#60Great idea, but while assembling this library, don't leave out permutations, combinations, and the binomial Probability Mass Function (PMF) and Cumulative Distribution Function (CDF). Small overhead, easy to implement, very useful. More here: http://arachnoid.com/binomial_probability
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, not generator functions.