Python for Scientific Calculations

I recently do a lot of mathematical computation, using MATLAB, unfortunately MATLAB is not open-source and fairly expensive to buy. There is a open-source reimplementation of the MATLAB language called GNU Octave. But I never really liked it, mostly because of the missing visualization features compared to MATLAB.

So I started to look for something else, and as I’m a huge fan of Python it was obvious to take a look at SciPy, a Scientific extension based on NumPy, a highly optimized multi-dimensional array library. And I must admit I don’t regret it.

Basically my environment consists of several components:

  • Python - The rock every thing is built upon

  • NumPy - The fast multidimensional array/matrix library

  • SciPy - Provides most functions MATLAB does

  • IPython - An interactive shell with many great features

  • matplotlib - Visualization of the data in a way similar to MATLAB

To get the most convenient environment I start IPython in the pylab mode by calling

$ ipython -pylab

If you are used to MATLAB and want to give SciPy a try, takeĀ  look at Mathesaurus, especially at NumPy for MATLAB users. It’s a good way to get quickly started with Python as a replacement for MATLAB.