Gradium × TensorTonic Voice Challenge is open for registration.Register now
25 Problems

NumPy Sheet

Build a solid foundation in NumPy for scientific computing. From array creation to advanced broadcasting and linear algebra operations.

15 Easy5 Medium5 Hard

Unlock the full study plan

Upgrade to Pro to access the full curriculum.

Upgrade to Pro
5 sections

What you will learn

NumPy is the array library underneath almost all machine learning code in Python. This plan has 25 problems in five sections, from creating arrays to indexing, broadcasting and vectorized operations, so you can replace slow Python loops with whole-array code.

Prerequisites

Basic Python: lists, loops and functions. No prior NumPy experience is needed.

The sections, in order

  1. Array creation: arrays from lists, zeros and ones, arange and linspace, random arrays and reshaping.
  2. Indexing and slicing: basic and fancy indexing, boolean masks, filtering and a mutation trap.
  3. Broadcasting: outer sums, row and column scaling, pairwise differences and column normalization.
  4. Vectorized operations: element-wise features, aggregations, sorting with argsort and a norm-gated linear transform.
  5. Array utilities: row extremes, winsorizing, quantizing, tiling, differencing, concatenation and correlation.

Where to go next

Use these skills in the Linear Algebra study plan, where every problem is written in NumPy, then move on to Cracking ML, which builds classic models from scratch in NumPy.