[SciPy-Dev] seeded randn gets different values on osx
Vincent Davis
vincent@vincentdavis....
Sat Jun 12 20:44:30 CDT 2010
There was another tread (scipy 8.0b release) describing a problem with
FAIL: test_stats.test_kstest see full test fail below.
After a little discusion with Josef here are some results. It appears
to me that osx gets different values from a seeded randn
>From Josef, I assume windows
>>>>> np.random.seed(0)
>>>>> np.random.randn(3)
>> array([ 1.76405235, 0.40015721, 0.97873798])
>
On my machine OSX py 2.6.5, numpy 1.4.0 scipy 8.0b
>>>> np.random.seed(0)
>>>> np.random.randn(3)
> array([ 0.06897149, 1.32078057, 1.5997924 ])
ubuntu 10.0.4 py 2.5.6 current scipy and numpy just built from the git source.
>>> np.random.seed(0)
>>> np.random.randn(3)
array([ 1.76405235, 0.40015721, 0.97873798])
FAIL: test_stats.test_kstest
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Frameworks/EPD64.framework/Versions/6.2/lib/python2.6/site-packages/nose/case.py",
line 186, in runTest
self.test(*self.arg)
File "/Library/Frameworks/EPD64.framework/Versions/6.2/lib/python2.6/site-packages/scipy/stats/tests/test_stats.py",
line 1228, in test_kstest
assert_almost_equal( D, 0.12464329735846891, 15)
File "/Library/Frameworks/EPD64.framework/Versions/6.2/lib/python2.6/site-packages/numpy/testing/utils.py",
line 459, in assert_almost_equal
raise AssertionError(msg)
AssertionError:
Arrays are not almost equal
ACTUAL: 0.093893737596468518
DESIRED: 0.12464329735846891
More information about the SciPy-Dev
mailing list