[SciPy-Dev] ANN: SciPy 0.11.0 release candidate 2

Ralf Gommers ralf.gommers at gmail.com
Sat Sep 8 12:21:29 EDT 2012


On Tue, Aug 14, 2012 at 4:53 PM, Samuel John <scipy at samueljohn.de> wrote:

>
> ======================================================================
> FAIL: test_stats.test_ttest_ind
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File
> "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/case.py",
> line 197, in runTest
>    self.test(*self.arg)
>  File
> "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/stats/tests/test_stats.py",
> line 1556, in test_ttest_ind
>    assert_array_almost_equal([t,p],(tr,pr))
>  File
> "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
> line 800, in assert_array_almost_equal
>    header=('Arrays are not almost equal to %d decimals' % decimal))
>  File
> "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
> line 636, in assert_array_compare
>    raise AssertionError(msg)
> AssertionError:
> Arrays are not almost equal to 6 decimals
>
> (mismatch 50.0%)
> x: array([ 1.09127469,  0.4998416 ])
> y: array([ 1.09127469,  0.27647819])
>
> ======================================================================
> FAIL: test_stats.test_ttest_ind_with_uneq_var
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File
> "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/case.py",
> line 197, in runTest
>    self.test(*self.arg)
>  File
> "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/stats/tests/test_stats.py",
> line 1596, in test_ttest_ind_with_uneq_var
>    assert_array_almost_equal([t,p], [tr, pr])
>  File
> "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
> line 800, in assert_array_almost_equal
>    header=('Arrays are not almost equal to %d decimals' % decimal))
>  File
> "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
> line 636, in assert_array_compare
>    raise AssertionError(msg)
> AssertionError:
> Arrays are not almost equal to 6 decimals
>
> (mismatch 50.0%)
> x: array([-0.68649513,  0.81407518])
> y: array([-0.68649513,  0.53619491])
>

These are a little odd. It gets the t-statistic right, so the problem is
not in stats. The issue seems to be in special.stdtr(), whose test isn't
failing for you. It only has a test for df=0 though.

The first failure comes down to giving a different answer from:
>>> special.stdtr(198, -1.09127) * 2
0.27648...

Do you get the same for these?
>>> special.stdtr(1, 0)   # this is tested
0.5
>>> special.stdtr(1, 1)  # this isn't
0.75000000000000022
>>> special.stdtr(1, 2)
0.85241638234956674

Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20120908/1194de15/attachment.html>


More information about the SciPy-Dev mailing list