Python for Scientific Computing

Robert G. Erdmann
Department of Materials Science & Engineering and Program in Applied Mathematics
University of Arizona

In developing software for scientific computation, one has typically been forced to choose between the fast development but slow program execution associated with high-level programming languages and the fast execution but slow development associated with low-level languages like FORTRAN. Another alternative has been the use of commercial software such as MATLAB (R) or Mathematica (R), but these applications are expensive and closed-source, thereby inhibiting sharing and collaboration with those portions of the scientific community who can't afford these applications. Such commercial codes are also highly specialized, making it difficult to extend them to wider problem domains.

The recent arrival of the SciPy package of high-level scientific computation modules for the Python programming language allows for the development of scientific computations suffering from none of these drawbacks. Python is a very high-level language, allowing for extremely rapid development of robust and sophisticated software. The speed-critical components of SciPy (linear algebra, FFTs, numerical quadrature, etc.) are called from within Python but are implemented in FORTRAN or C, enabling rapid execution speed. Furthermore, all of Python and SciPy are completely free and open-source, enabling scientific codes developed in Python to be distributed freely. And by using Python to develop scientific computations, one has access to a huge library of other general functionality, enabling for example easy development of software that has sophisticated graphical user interfaces (GUIs) and interfaces with databases, or that uses the internet to send e-mail or retrieve data.

The talk will provide a brief high-level overview of the Python programming language, followed by several examples of the ease with which powerful scientific computations can be performed using SciPy. Examples will include image processing, signal processing, solution of PDEs using sparse matrix solvers, advanced scientific visualization, and interactive distributed and parallel supercomputing.