[SciPy-user] what's wrong with radom.multivariate_normal

Jaonary Rabarisoa jaonary at free.fr
Sun Dec 18 05:56:31 CST 2005


I've built the latest svn on a mac os 10.4.2, with python 2.4.2  and  
FFTW installed with fink. It worked perfectly with gcc 3.3, broke  
with gcc 4.0.1. The problem with the random.mutlivariate_normal seems  
to be solved :

import scipy
a = scipy.random.multivariate_normal([0,0],[[1,0],[0,1]],[10])
print a
[[ 1.16298025 -0.44751277]
[ 0.40711338  1.15414107]
[ 0.0787966  -1.30920437]
[-1.3057994   0.43813078]
[ 0.56662083 -0.55948958]
[-0.23552752 -0.07318171]
[-0.39799132  0.74541927]
[ 0.73509922 -0.11506159]
[-1.02453562 -0.47928837]
[-1.26826607 -0.36258142]]

Good work :-)

I've also run the scipy.test() after the build process. It's seems  
that there's a lot of faillures. I don't really understand the  
meaning of the out put but you can find some part of it below.

Regards,


Jaonary


======================================================================
FAIL: check_definition  
(scipy.fftpack.pseudo_diffs.test_pseudo_diffs.test_diff)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/tests/ 
test_pseudo_diffs.py", line 89, in check_definition
     assert_array_almost_equal(diff(sin(x),2),direct_diff(sin(x),2))
   File "/sw/lib/python2.4/site-packages/scipy/test/testing.py", line  
763, in assert_array_almost_equal
     assert cond,\
AssertionError:
Arrays are not almost equal (mismatch 87.5%):
         Array 1: [ -6.0617241e-15  -3.8268343e-01  -7.0710678e-01   
-9.2387953e-01
   -1.0000000e+00  -9.2387953e-01  -7.0710678e-01  -3.82...
         Array 2: [ -7.4128027e-15   6.4859714e-15  -1.8855373e-15   
-1.1136318e-15
    1.4745663e-15  -8.7537278e-16  -3.8067825e-16   1.27...


======================================================================
FAIL: check_random_even  
(scipy.fftpack.pseudo_diffs.test_pseudo_diffs.test_hilbert)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/tests/ 
test_pseudo_diffs.py", line 335, in check_random_even
     assert_array_almost_equal(direct_hilbert(direct_ihilbert(f)),f)
   File "/sw/lib/python2.4/site-packages/scipy/test/testing.py", line  
763, in assert_array_almost_equal
     assert cond,\
AssertionError:
Arrays are not almost equal (mismatch 100.0%):
         Array 1: [  7.8062556e-18+0.j   0.0000000e+00-0.j    
6.7426270e-18-0.j
    0.0000000e+00-0.j   4.2932216e-18-0.j   0.0000000e+00-0....
         Array 2: [ 0.1637757  0.1730892 -0.5327494 -0.3623476  
-0.1693549 -0.2254976
   0.3936585  0.5272722  0.1489982  0.3217353  0.26324...


======================================================================
FAIL: check_definition  
(scipy.fftpack.pseudo_diffs.test_pseudo_diffs.test_shift)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/tests/ 
test_pseudo_diffs.py", line 393, in check_definition
     assert_array_almost_equal(shift(sin(x),a),direct_shift(sin(x),a))
   File "/sw/lib/python2.4/site-packages/scipy/test/testing.py", line  
763, in assert_array_almost_equal
     assert cond,\
AssertionError:
Arrays are not almost equal (mismatch 88.8888888889%):
         Array 1: [ 0.0998334  0.4341242  0.7160532  0.9116156   
0.9972237  0.9625519
   0.8117822  0.5630995  0.2464987 -0.0998334 -0.43412...
         Array 2: [ 0.0998334  0.0938127  0.0764768  0.0499167   
0.0173359 -0.0173359
-0.0499167 -0.0764768 -0.0938127 -0.0998334 -0.09381...


======================================================================
FAIL: check_random_even  
(scipy.fftpack.pseudo_diffs.test_pseudo_diffs.test_tilbert)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/tests/ 
test_pseudo_diffs.py", line 243, in check_random_even
     assert_array_almost_equal(direct_tilbert(direct_itilbert(f,h),h),f)
   File "/sw/lib/python2.4/site-packages/scipy/test/testing.py", line  
763, in assert_array_almost_equal
     assert cond,\
AssertionError:
Arrays are not almost equal (mismatch 100.0%):
         Array 1: [ -5.3741597e-18+0.j  -3.1548626e-18-0.j   
-3.8001048e-18-0.j
   -1.3067869e-18-0.j   0.0000000e+00-0.j   1.3067869e-18-0....
         Array 2: [-0.3992172  0.096423  -0.1631964 -0.3055548   
0.2795349 -0.0209729
-0.3378428 -0.04089   -0.146339  -0.1760787  0.02989...


======================================================================
FAIL: check_definition (scipy.fftpack.basic.test_basic.test_fft)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/tests/ 
test_basic.py", line 102, in check_definition
     assert_array_almost_equal(y,y1)
   File "/sw/lib/python2.4/site-packages/scipy/test/testing.py", line  
763, in assert_array_almost_equal
     assert cond,\
AssertionError:
Arrays are not almost equal (mismatch 100.0%):
         Array 1: [ 20.+0.j   0.+0.j  -4.+4.j   0.+0.j  -4.+0.j    
0.-0.j  -4.-4.j   0.-0.j]
         Array 2: [ 20.       +3.j         -0.7071068+0.7071068j   
-7.       +4.j
   -0.7071068-0.7071068j  -4.       -3.j          0.707106...


======================================================================
FAIL: check_definition (scipy.fftpack.basic.test_basic.test_fftn)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/tests/ 
test_basic.py", line 429, in check_definition
     assert_array_almost_equal(y,direct_dftn(x))
   File "/sw/lib/python2.4/site-packages/scipy/test/testing.py", line  
763, in assert_array_almost_equal
     assert cond,\
AssertionError:
Arrays are not almost equal (mismatch 22.2222222222%):
         Array 1: [[ 45. +0.j         -4.5+2.5980762j  -4.5-2.5980762j]
[-13.5+7.7942286j   0. +0.j          0. +0.j       ]
[-13.5-7.79...
         Array 2: [[ 45. +0.j         -4.5+2.5980762j  -4.5-2.5980762j]
[-13.5+0.j         -0. +0.j         -0. -0.j       ]
[-13.5+0.j ...


======================================================================
FAIL: check_definition (scipy.fftpack.basic.test_basic.test_ifft)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/tests/ 
test_basic.py", line 187, in check_definition
     assert_array_almost_equal(y,y1)
   File "/sw/lib/python2.4/site-packages/scipy/test/testing.py", line  
763, in assert_array_almost_equal
     assert cond,\
AssertionError:
Arrays are not almost equal (mismatch 100.0%):
         Array 1: [ 2.5+0.j   0. -0.j  -0.5-0.5j  0. -0.j  -0.5+0.j    
0. +0.j  -0.5+0.5j
   0. +0.j ]
         Array 2: [ 2.5      +0.375j      0.0883883+0.0883883j  
-0.125    -0.5j
   0.0883883-0.0883883j -0.5      -0.375j     -0.0883883-0.0...


======================================================================
FAIL: check_random_real (scipy.fftpack.basic.test_basic.test_ifft)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/tests/ 
test_basic.py", line 221, in check_random_real
     assert_array_almost_equal (ifft(fft(x)),x)
   File "/sw/lib/python2.4/site-packages/scipy/test/testing.py", line  
763, in assert_array_almost_equal
     assert cond,\
AssertionError:
Arrays are not almost equal (mismatch 98.0392156863%):
         Array 1: [ 0.795423  +0.0000000e+00j  0.1689491 -0.0000000e+00j
   0.4194747 +4.1361250e-17j  0.8712436 -1.7415263e-17j
   0.788789...
         Array 2: [ 0.795423   0.0771056  0.6592195  0.9114743   
0.7102914  0.5489242
   0.0900781  0.7954824  0.1029265  0.6601038  0.54681...


======================================================================
FAIL: check_definition (scipy.fftpack.basic.test_basic.test_ifftn)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/tests/ 
test_basic.py", line 598, in check_definition
     assert_array_almost_equal(y,direct_idftn(x))
   File "/sw/lib/python2.4/site-packages/scipy/test/testing.py", line  
763, in assert_array_almost_equal
     assert cond,\
AssertionError:
Arrays are not almost equal (mismatch 22.2222222222%):
         Array 1: [[ 5. +0.j        -0.5-0.2886751j -0.5+0.2886751j]
[-1.5-0.8660254j  0. +0.j         0. +0.j       ]
[-1.5+0.8660254j ...
         Array 2: [[ 5. +0.j        -0.5-0.2886751j -0.5+0.2886751j]
[-1.5+0.j        -0. -0.j        -0. +0.j       ]
[-1.5+0.j        ...


======================================================================
FAIL: check_definition (scipy.fftpack.basic.test_basic.test_irfft)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/sw/lib/python2.4/site-packages/scipy/fftpack/tests/ 
test_basic.py", line 345, in check_definition
     assert_array_almost_equal(y,ifft(x1))
   File "/sw/lib/python2.4/site-packages/scipy/test/testing.py", line  
763, in assert_array_almost_equal
     assert cond,\
AssertionError:
Arrays are not almost equal (mismatch 50.0%):
         Array 1: [ 2.625     -1.6856602 -0.375     -1.1856602   
0.625      0.4356602 -0.375
   0.9356602]
         Array 2: [ 2.625+0.j -0.375-0.j -0.375-0.j -0.375-0.j  0.625 
+0.j -0.375+0.j
-0.375+0.j -0.375+0.j]


======================================================================
FAIL: check_round (scipy.special.basic.test_basic.test_round)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/sw/lib/python2.4/site-packages/scipy/special/tests/ 
test_basic.py", line 1793, in check_round
     assert_array_equal(rnd,rndrl)
   File "/sw/lib/python2.4/site-packages/scipy/test/testing.py", line  
738, in assert_array_equal
     assert cond,\
AssertionError:
Arrays are not equal (mismatch 25.0%):
         Array 1: [10 10 10 11]
         Array 2: [10 10 11 11]


----------------------------------------------------------------------
Ran 1230 tests in 7.401s

FAILED (failures=11)
<unittest.TextTestRunner object at 0x28cbb30>



More information about the SciPy-user mailing list