Scientific computing

Scientific computing, mathematical modeling, and computer simulation

How to build ScipPy with Python 2.7.2 on CentOS5

EDIT: added –enable-shared to configure script for building Python, and added /home/yourname/lib to shared library path.  This is necessary for building some packages such as pycairo (which you may need to build pygtk and matplotlib). EDIT 2: you should use the –prefix=/home/yourusername instead of –user.  The prefix option places packages in the standard location: /home/yourusername/lib/python2.7/site-packages. 

How to build ScipPy with Python 2.7.2 on CentOS5 Read More »

A self-contained Fortran linear equation solver

I’ve just released a self-contained Fortran module that solves a system of linear equations using the LU decomposition. Download the Fortran linear solver from github This module is based on code that was implemented and released on the Web by Jean-Pierre Moreau.  His implementation was based on one of the Numerical Recipes books.  I updated

A self-contained Fortran linear equation solver Read More »

Constrained least-squares fitting with Python

Scipy contains a good least-squares fitting routine, leastsq(), which implements a modified Levenberg-Marquardt algorithm.  I just learned that it also has a constrained least-squared routine called fmin_slsqp().   I am using simple upper and lower bound constraints, but it’s also possible to specify more complex functional constraints. What I did not realize, at first, is that

Constrained least-squares fitting with Python Read More »