[Scipy-tickets] [SciPy] #745: scipy.stats.distribution - tests and bugfixes

SciPy scipy-tickets@scipy....
Fri Oct 31 23:29:55 CDT 2008

#745: scipy.stats.distribution - tests and bugfixes
 Reporter:  josefpktd    |        Owner:  somebody
     Type:  defect       |       Status:  new     
 Priority:  normal       |    Milestone:          
Component:  scipy.stats  |      Version:  devel   
 Severity:  normal       |   Resolution:          
 Keywords:               |  
Comment (by josefpktd):

 An update: I incorporated improvements to my corrections proposed by Per
 see http://projects.scipy.org/pipermail/scipy-

 this I didn't find time to do:
 In order to improve accuracy in calculation for small x values, I would
 also suggest to replace all calls to
 log(1-x) and 1-exp(-x)
 log1p(-x) and -expm1(-x), respectively

 I also wrote a basic test file for the continuous distributions, and found
 several (?) additional bugs that I corrected in my distributions.py file.
 Given the number of small bugs, I didn't write a separate bug report for
 each. They are commented in the file and marked with #JP.

 I haven't merged the latest changes of the scipy trunk to my file, which
 is mainly the conversion of the Von Mises distribution to cython.

 I attach my updated distributions.py and the testfile
 test_continuous_basic.py. This file tests *all* continuous distributions
 and has DECIMAL as a parameter for the assert_almost_equal comparison.

 With Decimal=2, I now get for the cdf,ppf,pdf,rvs,sf,isf tests:
 Ran 410 tests in 124.187s
 FAILED (errors=2, failures=10)
 Of the failures, several are with vonmises, and some might be caused by a
 numerically imprecise test. The tests are based on "nice" parameters, from
 my fuzz testing, I know that additional tests fail where the distributions
 don't work over the entire valid parameter space.

 But my bugfixes, make the generic methods work correctly (as far as I got)
 and many of the FIXMEs can be removed.


Ticket URL: <http://scipy.org/scipy/scipy/ticket/745#comment:5>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.

More information about the Scipy-tickets mailing list