ANN: stats 0.1a calculator statistics for Python

Vlastimil Brom vlastimil.brom at gmail.com
Mon Oct 18 17:24:39 EDT 2010


2010/10/17 Steven D'Aprano <steve at remove-this-cybersource.com.au>:
> I am pleased to announce the first public release of stats for Python.
>
> http://pypi.python.org/pypi/stats
>
> stats is a pure-Python module providing basic statistics functions
> similar to those found on scientific calculators. It currently includes:
>
> Univariate statistics including:
> * arithmetic, harmonic, geometric and quadratic means
> * median, mode
> * standard deviation and variance (sample and population)
>
> Multivariate statistics including:
> * Pearson's correlation coefficient
> * covariance (sample and population)
> * linear regression
>
> and others.
>
> This is an unstable alpha release of the software. Feedback and
> contributions are welcome.
>
>
>
> --
> Steven D'Aprano
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Thanks for this useful module!
I just wanted to report a marginal error triggered in the doctests:

Failed example:
    isnan(float('nan'))
Exception raised:
    Traceback (most recent call last):
      File "C:\Python25\lib\doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest __main__.isnan[0]>", line 1, in <module>
        isnan(float('nan'))
    ValueError: invalid literal for float(): nan

(python 2.5.4 on win XP; this might be OS specific; probably in the
newer versions float() was updated, the tests on 2.6 and 2.7 are ok ):

I too would be interested in a comparison with the older module with
the same name:
http://www.nmr.mgh.harvard.edu/Neural_Systems_Group/gary/python.html
which is likely to be the same as the above mentioned one.

vbr



More information about the Python-list mailing list