A short series of tutorial notebooks outlining some basics of Python for scientific computing, originally given for the Complexity Sciences Center at UC Davis. Numerical solutions of elementary cellular automata (CA) is the motivating task. The tutorials start with an intuitive implementation CA simulation using Python dictionaries and native for-loops. Some details of writing good "Pythonic" code, including the use of functions and classes, are described. We then show how to speed up the simulation code first using numpy, then numba. Unit testing is also introduced, to insure the different versions of the simulator produce the same output.
I recommend using Anaconda to install Python and manage packages. An environment.yml file is included to install the necessary packages for this tutorial, including jupyter notebooks.