NumPy arrays

NumPy arrays are fast, math-ready lists of numbers — the container every ML library speaks.

`np.array([...])` makes an array. Math applies to every element at once (vectorised): `a * 2` doubles all of them. `.sum()`, `.mean()` and `.shape` summarise it.

import numpy as np
a = np.array([1, 2, 3])
print(a * 2)     # [2 4 6]
print(a.sum())   # 6

More lessons in Python for data