NumPy
Arrays, shapes and broadcasting — the layer everything else is built on.
Foundations
4/4What an array is made of, and how it sits in memory.
- 1
What an ndarray actually is
One type, one block of memory — and why everything else follows from that.
8 min0/3 - 2
Making arrays
zeros, ones, arange, linspace, eye, random — pick a shape, then a filling rule.
8 min0/3 - 3
dtypes, precision and casting
Fixed-width boxes — and every surprise that follows from them.
12 min0/3 - 4
Memory, strides and contiguity
One number per axis that explains reshape, transpose and every free operation.
12 min0/3
Indexing & selection
5/5Getting at the values you want — by position, by condition, by list.
- 5
Indexing and slicing
One range per axis — and why an integer removes an axis while a slice keeps it.
10 min0/4 - 6
Views, copies and shared memory
Slicing doesn’t copy — and that will edit your data behind your back exactly once.
12 min0/3 - 7
Boolean masks
Selecting by condition — and why the answer comes back flat.
11 min0/4 - 8
Fancy indexing
Indexing with a list of positions — and why two lists zip instead of crossing.
12 min0/4 - 9
where, select and clip
An if-statement over a whole array, without losing its shape.
11 min0/4
Shape
4/4Rearranging, joining, splitting, and making mismatched shapes agree.
- 10
Reshaping and transposing
The memory never moves — only the rule for walking it.
10 min0/3 - 11
Adding, removing and moving axes
newaxis, squeeze, moveaxis — the tools for making shapes line up.
10 min0/4 - 12
Joining and splitting arrays
concatenate extends an axis; stack creates one. Everything else is shorthand.
11 min0/4 - 13
Broadcasting
How NumPy makes mismatched shapes work — without copying anything.
13 min0/3
Computation
5/5Doing arithmetic to whole arrays, then reducing them down.
- 14
Vectorisation and ufuncs
The loop doesn’t disappear — it moves somewhere much faster.
9 min0/3 - 15
Aggregation and the axis argument
The axis you name is the axis that disappears.
10 min0/3 - 16
Running totals and differences
The reductions that don’t reduce — cumsum, diff, and their friends.
9 min0/4 - 17
Sorting and searching
argsort is the one that matters — it returns the order, so you can apply it anywhere.
11 min0/4 - 18
unique and set operations
Distinct values, frequency tables, and the vectorised version of `in`.
10 min0/4
Numerics
4/4Missing values, randomness, statistics and linear algebra.
- 19
NaN, inf and missing values
Why one gap poisons a whole sum, and why `== np.nan` never finds anything.
10 min0/4 - 20
Random numbers and sampling
Seed it, or you can’t tell a real change from noise.
10 min0/4 - 21
Summary statistics
mean vs median, spread, percentiles — and when the average lies to you.
11 min0/4 - 22
Linear algebra
@ is not *, and that one character is most of machine learning.
13 min0/4
In practice
3/3Coordinate grids, making it fast, and getting data in and out.
Capstones
3/3Whole projects that use the lot.
- 26
Capstone: edit a photo with nothing but NumPy
capstoneEvery idea from the track, applied to something you can see.
20 min0/7 - 27
Capstone: analysis without pandas
capstoneInspect, clean, aggregate, rank — 270 readings and no DataFrame in sight.
20 min0/5 - 28
Capstone: Conway’s Game of Life, without a single loop
capstoneA whole simulation in two lines of array arithmetic.
22 min0/4
