Math 480: Open Source Mathematical Software
2016-05-16
William Stein
Lectures 22: Numpy, Matplotlib, and Scipy (part 1 of 3)
Homework DUE 2016-05-20 is now available.
Reminder: peer grading of homework DUE-2016-05-06 is due tonight at 6pm.
Peer grading guidelines for homework DUE-2016-05-13 are available.
Start screencast
10min -- Very brief first intro to numpy, matplotlib and scipy (more Wed and Friday)
15min+ -- Talk about the 3 homework problems
Get started on homework or start working through some of the tutorials on your own in a worksheet.
10 minute intro to numpy, matplotlib and scipy.
Numpy, Matplotlib, and Scipy are (along with Cython) the foundation of the Scientific Python Stack.
Pretty much everything in the world of Python "data science" depends on them.
The community is unified around them as the foundation on which to build.
All are very polished and heavily used at this point.
Written in mostly C, C++ and some Fortran (scipy). Very highly optimized for speed. Lots of "vectorized operations".
When you hear about running Python in your web browser, or from Java, or on top of a JIT, probably none of Numpy, Matplotlib, and Scipy are supported in that context, so people doing numerical python work will not be excited.
### [Numpy:](http://www.numpy.org/) provides an -dimensional array object and lots of functionality with it.
> "NumPy is the fundamental package for scientific computing with Python."You should spend 2 hours and go through the Numpy Tutorial.
### [Matplotlib:](http://matplotlib.org/) provides graphics much like matlab (and much more).
> "matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms."You should spend an hour and go through this Matplotlib tutorial.
### [Scipy:](https://www.scipy.org/scipylib/index.html) provides many numerical algorithms beyonds just matrices...
> "Scipy is the fundamental library for scientific computing. It provides many user-friendly and efficient numerical routines such as routines for numerical integration and optimization."You should spend several hours on the Scipy tutorial.