我在ubuntu 14.10 64位上通过apt-get安装了numpy,scipy,openblas。 numpy.test()运行没有任何失败,但scipy.test()在test_decomp.test_eigh上失败
Running unit tests for scipy
NumPy version 1.9.1
NumPy is installed in /usr/local/lib/python2.7/dist-packages/numpy
SciPy version 0.14.0
SciPy is installed in /usr/lib/python2.7/dist-packages/scipy
Python version 2.7.8 (default, Oct 20 2014, 15:05:19) [GCC 4.9.1]
nose version 1.3.4
....
....
....
======================================================================
FAIL: test_decomp.test_eigh('general ', 6, 'F', True, False, False, (2, 4))
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/usr/lib/python2.7/dist-packages/scipy/linalg/tests/test_decomp.py", line 648, in eigenhproblem_general
assert_array_almost_equal(diag2_, ones(diag2_.shape[0]), DIGITS[dtype])
File "/usr/local/lib/python2.7/dist-packages/numpy/testing/utils.py", line 842, in assert_array_almost_equal
precision=decimal)
File "/usr/local/lib/python2.7/dist-packages/numpy/testing/utils.py", line 665, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not almost equal to 4 decimals
(mismatch 100.0%)
x: array([ 0., 0., 0.], dtype=float32)
y: array([ 1., 1., 1.])
我认为我的blas版本有问题,但我尝试了几个blas版本,但对测试结果完全没有影响。 有什么建议吗?