NumPy and SciPy on OSX

At ETHs D-ITET (Electrical Engineering Departement), you are more or less forced to use Matlab.

As a programmer, Matlab’s organically grown and inconsistent syntax and structure hurts my eyes. Also, one gets accustomed to an extremely expensive, closed commercial product.

Enter NumPy and SciPy: These Python libraries have most of the features needed in 2nd Year of ETH. Also, its very easy to change from Matlab, as most commands are equal or similar.

Guide to install PyLab on OSX

You can now use IPython from the CLI. Also available are a QT (Graphical) console (ipython qtconsole), and browser-based so-called notebooks similar to Mathematicas GUI (ipython notebook).

Here, you find a complete beginners guide.

An Example:

$ ipython --pylab
  Python 2.7.6 (default, Feb 28 2014, 12:18:57)
  Type "copyright", "credits" or "license" for more information.

  IPython 1.2.1 -- An enhanced Interactive Python.
  ?         -> Introduction and overview of IPython's features.
  %quickref -> Quick reference.
  help      -> Python's own help system.
  object?   -> Details about 'object', use 'object??' for extra details.
  Using matplotlib backend: MacOSX

  In [1]: plot(cumsum(random.random_integers(-1, 1, 100)))
  Out[1]: [<matplotlib.lines.Line2D at 0x107c696d0>]

  In [2]:

Which produces the following image:

Random Walk using NumPy and Matplotlib