Numpy and Scipy

Resources

http://www.tramy.us/numpybook.pdf

http://numpy.sourceforge.net/numdoc/HTML/numdoc.htm

Install Numpy to your home folder

http://www.scipy.org/Installing_SciPy/Linux

I had to specify the fortran-compiler explicitly:

python setup.py build --fcompiler=gnu95
python setup.py install --prefix=/home/theo/myname

To ensure that python finds the library (or finds it first there) we have to set (in python)

path = [“/home/theo/smeuren/lib64/python2.6/site-packages/”]

import sys

path += sys.path

sys.path = path

Alternatively we can use PYTHONPATH:

PYTHONPATH=$PYTHONPATH:/home/theo/myname/lib64/python2.6/site-packages/
export PYTHONPATH

One meight need ATLAS: http://math-atlas.sourceforge.net/ (Did not work on the cluster, It appears you have cpu throttling enabled, which makes timings unreliable and an ATLAS install nonsensical.  Aborting.)

LAPACK: http://www.netlib.org/lapack/

Scipy

http://www.scipy.org/

Convert float array to integer

http://www.mail-archive.com/numpy-discussion@scipy.org/msg23970.html

y = x.astype(int)

Universial Functions

http://docs.scipy.org/doc/numpy/reference/generated/numpy.frompyfunc.html#numpy.frompyfunc

Output precission

http://mail.python.org/pipermail/tutor/2007-December/058964.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: