I was trying to install python and its scientific libraries on a clean install of Mountain Lion, with Xcode and its command line tools.
I installed homebrew and, through it, a fresh python 2.7 as I didn't want to mess up with the one Apple provides. I also installed gfortran always via homebrew.
Then I install Numpy from its source, using the flag to build it using gfortran. I did this because if I pip install it then the scipy installation will fail.
With installed, I tested it through bumpy.test('full') and it says OK.
At this point I tried to install scipy, both using pip or from source. The result is the same, it installs but i get a HUGE number of failures and one error when I test it using scipy.test(). Any idea of how to fix this?
The reported error is
ERROR: test_logm_consistency (test_matfuncs.TestExpM)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/scipy/linalg/tests/test_matfuncs.py", line 124, in test_logm_consistency
assert_array_almost_equal(expm(logm(a)), a)
File "/usr/local/lib/python2.7/site-packages/scipy/linalg/matfuncs.py", line 453, in logm
errest = norm(expm(F)-A,1) / norm(A,1)
File "/usr/local/lib/python2.7/site-packages/scipy/linalg/matfuncs.py", line 49, in expm
A_L1 = norm(A,1)
File "/usr/local/lib/python2.7/site-packages/scipy/linalg/misc.py", line 12, in norm
a = np.asarray_chkfinite(a)
File "/usr/local/lib/python2.7/site-packages/numpy/lib/function_base.py", line 590, in asarray_chkfinite
"array must not contain infs or NaNs")
ValueError: array must not contain infs or NaNs
The failures are instead related to boas, basic, dot, asum, nrm2, arpack.
Any idea of how to fix this?