Lecture 14 – NumPy

Data 6, Summer 2021

Review: dictionaries

Quick Check 1

Review: lists

NumPy

Benefit 1: operations on every element

Basic operations:

Example: Celsius to Fahrenheit

More math

Quick Check 2

Benefit 2: element-wise operations

Example: population growth

Quick Check 3

Other features of arrays

Accessing individual elements

Common methods

Ranges

Automatic type conversion

Even more functions