[SciPy-dev] scipy.linalg.eigvals error on 64bit RH3 & RH4

David Martin frostedcheerios@gmail....
Mon Jul 13 16:43:17 CDT 2009


Has anyone else gotten these scipy.test() errors when running on RH3 and 
RH4 (both 64bit)? The following tests pass on RH5 64-bit and RH3,4,5 
32-bit, so this seems to be a 64-bit RH issue prior to RH5. It looks 
like eigvals isn't returning the correct values:

-David

On Windows XP 32-bit:

Python 2.5.4 (r254:67916, May 17 2009, 21:12:18) [MSC v.1310 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
 >>> from numpy import sqrt
 >>> from scipy.linalg import eigvals
 >>> a = [[1,2,3],[1,2,3],[2,5,6]]
 >>> w = eigvals(a)
 >>> exact_w = [(9+sqrt(93))/2,0,(9-sqrt(93))/2]
 >>> w
array([  9.32182538e+00+0.j,  -9.59852072e-16+0.j,  -3.21825380e-01+0.j])
 >>> exact_w
[9.3218253804964775, 0, -0.32182538049647746]

On RH3.8 64-bit:

Python 2.5.4 (r254:67916, May 20 2009, 22:57:32) [GCC 3.2.3 20030502 
(Red Hat Linux 3.2.3-56)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> from numpy import sqrt
 >>> from scipy.linalg import eigvals
 >>> a = [[1,2,3],[1,2,3],[2,5,6]]
 >>> w = eigvals(a)
 >>> exact_w = [(9+sqrt(93))/2,0,(9-sqrt(93))/2]
 >>> w
array([ 9.43719064+0.j, -0.11536526+0.j, -0.32182538+0.j])
 >>> exact_w
[9.3218253804964775, 0, -0.32182538049647746]

======================================================================
FAIL: test_simple (test_decomp.TestEig)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/home/tester/master/lib/python2.5/site-packages/scipy/linalg/tests/test_decomp.py", 
line 145, in test_simple
    assert_array_almost_equal(w,exact_w)
  File 
"/home/tester/master/lib/python2.5/site-packages/numpy/testing/utils.py", 
line 537, in assert_array_almost_equal
    header='Arrays are not almost equal')
  File 
"/home/tester/master/lib/python2.5/site-packages/numpy/testing/utils.py", 
line 395, in assert_array_compare
    raise AssertionError(msg)
AssertionError:
Arrays are not almost equal

(mismatch 66.6666666667%)
 x: array([ 9.43719064+0.j, -0.11536526+0.j, -0.32182538+0.j])
 y: array([ 9.32182538,  0.        , -0.32182538])

======================================================================
FAIL: test_simple (test_decomp.TestEigVals)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/home/tester/master/lib/python2.5/site-packages/scipy/linalg/tests/test_decomp.py", 
line 114, in test_simple
    assert_array_almost_equal(w,exact_w)
  File 
"/home/tester/master/lib/python2.5/site-packages/numpy/testing/utils.py", 
line 537, in assert_array_almost_equal
    header='Arrays are not almost equal')
  File 
"/home/tester/master/lib/python2.5/site-packages/numpy/testing/utils.py", 
line 395, in assert_array_compare
    raise AssertionError(msg)
AssertionError:
Arrays are not almost equal

(mismatch 66.6666666667%)
 x: array([ 9.43719064+0.j, -0.11536526+0.j, -0.32182538+0.j])
 y: array([ 9.32182538,  0.        , -0.32182538])

======================================================================
FAIL: test_simple_tr (test_decomp.TestEigVals)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/home/tester/master/lib/python2.5/site-packages/scipy/linalg/tests/test_decomp.py", 
line 122, in test_simple_tr
    assert_array_almost_equal(w,exact_w)
  File 
"/home/tester/master/lib/python2.5/site-packages/numpy/testing/utils.py", 
line 537, in assert_array_almost_equal
    header='Arrays are not almost equal')
  File 
"/home/tester/master/lib/python2.5/site-packages/numpy/testing/utils.py", 
line 395, in assert_array_compare
    raise AssertionError(msg)
AssertionError:
Arrays are not almost equal

(mismatch 66.6666666667%)
 x: array([ 9.43719064+0.j, -0.11536526+0.j, -0.32182538+0.j])
 y: array([ 9.32182538,  0.        , -0.32182538])

======================================================================
FAIL: test (test_speigs.TestEigs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/home/tester/master/lib/python2.5/site-packages/scipy/sparse/linalg/eigen/arpack/tests/test_speigs.py", 
line 34, in test
    assert_array_almost_equal(calc_vals, vals[0:nev], decimal=7)
  File 
"/home/tester/master/lib/python2.5/site-packages/numpy/testing/utils.py", 
line 537, in assert_array_almost_equal
    header='Arrays are not almost equal')
  File 
"/home/tester/master/lib/python2.5/site-packages/numpy/testing/utils.py", 
line 395, in assert_array_compare
    raise AssertionError(msg)
AssertionError:
Arrays are not almost equal

(mismatch 100.0%)
 x: array([ 0.03559256,  0.73900411,  0.73525312,  1.07213911])
 y: array([ 0.25819889,  0.51639778,  0.77459667,  1.03279556])


More information about the Scipy-dev mailing list