header image

Python for Scientific Computing

Python is the preferred programing language for the courses Math 245, 246, 445, and 545 that I teach (though student with strong skills in an alternative like Matlab may use that instead.) More specifically, I recommend using Python version 3.5 or above (and definitely not the obsolescent version 2.7). I also recommend using through the Spyder environment, which conveniently combines the basic Python language and environment with packages that add resources for numerical computing and graphics, along with nice tools for editing and developing Python code, all in an easily downloaded cross-platform bundle. See the Spyder page at Python Hosted or go straight to the Spyder download page at GitHub.

For some presentations such as reports on projects in those courses, it can also be useful to have the interactive notebook environment Jupyter.  For now, the easiest way to get that is with the bundle Anaconda, which also includes a version of Spyder and many other Python-related tools.  If you get that, again be sure to specify that you want the version with Python 3.5 or newer.

Fortunately the whole Python ecosystem is very open: not only is all the software that we need free, but there are abundant online resources to learn Python programming and ask questions.  One comprehensive source is the SciPy Lecture Notes on the web-site http://www.scipy-lectures.org which is readable both through the HTML version at that site or by downloading PDF versions from there. Altogether that is a 300+ page book, but you will not need anything like all of it of my courses.

That SciPy site is very comprehensive, but rather high-level. Another more introductory PDF book is Introduction to Python Programming from the NCLAB project. That is primarily aimed at teaching programming to high school students, but despite its talk of “programming for kids”, its Python resources are fine for adults too!  You can download that PDF book from  https://nclab.com/python-resources/ but I will also host a copy.

Another more introductory resource is my collection of interactive Jupyter notebooks used to teach Scientific Python programming in Math 246. The versions from Fall 2015 are available in this site at the page MATH 246 python notebooks. and I plan to update them as I teach the course again in Fall 2017. However, to use the interactive features, executing and editing Python code with the notebooks, you will need Jupyter.

Finally, a great place to get questions answered about Python programming (and all kinds of programming) is http://stackoverflow.com. Internet searches on Python-related questions often take you to a version of your question there, already asked, answered, and debated.

Skip to toolbar