Math 152: Intro to Mathematical Software
2017-02-27
Kiran Kedlaya; University of California, San Diego
adapted from lectures by William Stein, University of Washington
Lecture 20: Numpy, Matplotlib, and Scipy (part 1): Overviews
Announcements:
Modified office hours this week: mine are today 3-4; Zonglin's are Tuesday 10-12.
As usual, homework due Tuesday 8pm. Peer grading due Thursday 8pm.
Advance warning: Peter and Zonglin and I will simultaneously be away at a conference during the first half of week 10 (the week starting March 13). We will thus have a modified schedule for that week, with the problem set and peer grading due later than usual. Details to follow. (Remember, there is no final exam for this course.)
10 minute intros 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".
We'll take a quick look at some tutorials for each of these packages. Later in the week, we'll demonstrate these in more details within SMC.
### [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.