Using Numpy in different platforms Using Numpy in different platforms numpy numpy

Using Numpy in different platforms


Download Anaconda package manager

http://continuum.io/downloads

When you download this it will already have all the dependencies for numpy worked out for you. It installs locally and will work on most platforms.


This is not really an answer, but this blog discusses in length the problems of having a numpy ecosystem that evolves fast, at the expense of reproducibility.

By the way, which version of numpy are you using? The documentation for the latest 1.9 does not report any method called cg as the one you use...

I suggest the use of this example so that you (and others) can check the results.

>>> import numpy as np>>> import scipy.linalg>>> np.random.seed(123)>>> a = np.random.random(size=(10000, 10000))>>> b = np.random.random(size=(10000,))>>> s_np = np.linalg.solve(a, b)>>> s_sc = scipy.linalg.solve(a, b)>>> np.allclose(s_np,s_sc)>>> s_nparray([-15.59186559,   7.08345804,   4.48174646, ..., -16.43310046,    -8.81301553, -10.77509242])


I hope you can find the answer - one option in the future is to create a virtual machine for each of your projects, using Docker. This allows easy portability.

See a great article here discussing Docker for research.