Python Reading
Key Ideas
- Creating np arrays
- Slicing and reshaping arrays
- Operations on arrays such as broadcasting
In-Class Activity
- Introduce Program 5.
- Understand broadcast.py, a program
that illustrates the concept of broadcasting.
Active Learning
- Create a Person class that contains two fields: a first name
and a last name. Then create a numpy array that contains 5 Person(s).
Finally, use the built-in sorted function to alphabetize
the array using the last name as the primary key and the first name
as the secondary key.