Better exercise 2 for numpy notebook