Numpy () test with errors
on ubuntu 12.04 x32 I installed python 2.7.3, numpy 1.6.1 via sudo apt-get install python-numpy
. I run test()
from numpy via numpy.test()
and I get:
FAIL: test_pareto (test_random.TestRandomDist)
Traceback (last call last): File "/usr/lib/python2.7/dist-packages/numpy/random/tests/test_random.py", line 313, in test_pareto np.testing.assert_array_almost_equal (actual, desired, decimal = 15) File "/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 800, in file assert_array_almost_equal header = ('Arrays are not equal to% d decimal places "% decimal places)) File" /usr/lib/python2.7/dist-packages/numpy/testing/utils.py ", line 636, in file assert_array_compare Raise AssertionError (msg) AssertionError: Arrays are not 15 decimal places
(discrepancy 16.6666666667%) x: array ([[2.46852460e + 03, 1.41286881e + 03], [5.28287797e + 07, 6.57720981e + 07], [1.40840323e + 02, 1.98390255e + 05]]) y: array ([[2.46852460e + 03, 1.41286881e + 03], [5.28287797e + 07, 6.57720981e + 07], [1.40840323e + 02, 1.98390255e + 05]])
Ran 3169 tests at 17.483s
FAILED (KNOWNFAIL = 3, SKIP = 4, failures = 1)
What should I do? Am I missing an addiction or so?
Thank.
source to share
Notes for future me when you try to redo stuff:
- There are some prerequisites for working with
numpy
/scipy
:g++
gfortran
blas
atlas
lapack
. - Seems to be better and time consuming to compile the numpy / scipy sources. pip install does this.
Commands:
sudo apt-get install g ++ gfortran liblapack-dev libopenblas-dev python-dev python-pip
sudo pip install nose
sudo pip install numpy
python -c "import numpy; numpy.test ()"
For the scipy library, worked:
sudo pip install scipy
python -c "import scipy; scipy.test ()"
source to share