Week 2#

Use the Navigation menu on the left to find the course content.

There is only one notebook this week, in which we practice with NumPy. NumPy is the most important Python library for Math 9, and we will use it extensively for the rest of the class.

We first introduced NumPy when we used the slicing assignment syntax myarray[1::2] = 8 in one of the versions of our alternating function from the section Using NumPy.

A recurring theme, which we can already see in the myarray[1::2] = 8 example, is that with NumPy, it is often possible to avoid for loops, making our code both more efficient as well as more elegant.