Skip to main content

Module 3: NumPy

Vector Programming and Numerical Computing

This module introduces NumPy, Python’s main library for numerical computing. You will learn to represent numerical data with arrays, operate on entire arrays at once, simulate random processes, and apply linear algebra to practical problems.

ImportantHow to approach this module

NumPy has hundreds of functions, and nobody expects you to remember them. In this module you will see some of what NumPy can do, so that you know which kinds of operations exist. In the exams you will have a cheat sheet with the functions you need.

What you must master is the core, which is common to every function and submodule: how to work with arrays, their shape, their dimensions, their axes, and how to index them.

Session Structure

Session 14:

Introduction to NumPy

Session 15:

Array Arithmetic and Broadcasting Array Functions

Session 16:

Array Manipulation

Session 17:

Loading and Saving Data

Session 18:

Masking: Sets and Logic Masking with Images Extra practice: Masking with the Cardboard

Session 19:

Random Numbers and Fancy Indexing

Session 20:

Statistics and Simulation

Session 21:

Linear Algebra

Session 22:

Vectorization

Session 23:

Review and Homework


Practice and Review

Homework


Side Projects

Want to get extra credit? Try one of the NumPy side projects. They work like the side projects of Module 2, and they are not part of the session schedule.

Side Projects