Python Programming

Here is a series of introductions to Python programming—programming oriented towards scientific and mathematical uses. I recommend working through them in order. We are going to work through one per week in the order given below. They are the focus of the Thursday programming lab.

Keep the book Learning Python nearby and learn to use it as a reference. The series of introductions is intended to get to useful scientific programming quickly and, in doing so, leaves out many of the details that the book systematically develops.

iPython

Have iPython running so that you can test what the introductions describe as you read along.

To get started with iPython go to the tutorial.

The introductions are schematic. They assume you will use iPython to probe around and test the features and commands that are described. If something's confusing, look up the relevant sections in the Python book or in the online Python documentation, whose links are given below.

Exercises

There are programming exercises. These will be assigned each Thursday.

Solutions are due one week later on the following Thursday.

They will be graded in lab class, one on one, with the TA and instructor.

Programming Labs

After This Course, What's Next?

As a next pass to deepen your understanding of the Python language itself, once we've gone through the (about a dozen) introductory lessons, you might want to work through the Python tutorial, which is not focused on scientific computing. It is a more systematic introduction to Python the language than the above. There are extensive online documents here.

Documentation for the NumPy numerical Python package is here. And the documentation for the Scientific package is found in its manual. A more comprehensive and up-to-date set of documentation is found here.

Other suggestions for Python documentation are given in the Supplemental Reading list.


chaos@ucdavis.edu Last updated 22 March 2010