[SciPy-Dev] ANN: SciPy 0.8.0 beta 1
Derek Homeier
derek@astro.physik.uni-goettingen...
Fri Jun 11 18:54:56 CDT 2010
Hi Josef,
>> FAIL: test_stats.test_kstest
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>> File "/sw/lib/python2.6/site-packages/nose/case.py", line 186, in runTest
>> self.test(*self.arg)
>> File "/sw/lib/python2.6/site-packages/scipy/stats/tests/test_stats.py", line 1078, in test_kstest
>> np.array((0.0072115233216310994, 0.98531158590396228)), 14)
>> File "/sw/lib/python2.6/site-packages/numpy/testing/utils.py", line 441, in assert_almost_equal
>> return assert_array_almost_equal(actual, desired, decimal, err_msg)
>> File "/sw/lib/python2.6/site-packages/numpy/testing/utils.py", line 765, in assert_array_almost_equal
>> header='Arrays are not almost equal')
>> File "/sw/lib/python2.6/site-packages/numpy/testing/utils.py", line 609, in assert_array_compare
>> raise AssertionError(msg)
>> AssertionError:
>> Arrays are not almost equal
>>
>> (mismatch 100.0%)
>> x: array([ 0.007, 0.985])
>> y: array([ 0.007, 0.985])
>
> maybe the precision (decimal 14) is too high for this test across platforms
>
> Could you check how large the difference is ?
>
> np.random.seed(987654321)
> x = stats.norm.rvs(loc=0.2, size=100)
> np.array(stats.kstest(x,'norm', alternative = 'greater')) -
> np.array((0.0072115233216310994, 0.98531158590396228))
>
> (my line numbers differ, but this should be the right test given your numbers)
yes, just a decimal or two too high, if I got the numbers right:
# OS X 10.5 i386 / 10.6 x86_64:
array([ 8.67361738e-18, 1.66533454e-15])
# OS X 10.5 ppc:
array([ 2.05955045e-13, -7.16759985e-13])
Cheers,
Derek
More information about the SciPy-Dev
mailing list