[Scipy-tickets] [SciPy] #1734: special.stdtr issue on OS X 10.8

SciPy Trac scipy-tickets@scipy....
Sat Sep 22 03:29:54 CDT 2012


#1734: special.stdtr issue on OS X 10.8
---------------------------+------------------------------------------------
 Reporter:  rgommers       |       Owner:  pv         
     Type:  defect         |      Status:  new        
 Priority:  normal         |   Milestone:  Unscheduled
Component:  scipy.special  |     Version:  0.10.0     
 Keywords:                 |  
---------------------------+------------------------------------------------
 See http://article.gmane.org/gmane.comp.python.scientific.devel/16899

 Test failures are
 {{{
 ======================================================================
 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])
 }}}
 but the issue must be in stdtr(), because the t-statistic is correct. To
 get the p-value, all that's used is a call to stdtr() via stats.t.sf().


 There aren't a lot of tests:
 {{{
 >>> special.stdtr(1, 0)   # this is tested
 0.5
 >>> special.stdtr(1, 1)  # this isn't
 0.75000000000000022
 >>> special.stdtr(1, 2)  # this isn't
 0.85241638234956674
 }}}

 Adding a few tests may help to show the issue more directly, and see if it
 shows up on other platforms.

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


More information about the Scipy-tickets mailing list