You’ll be able to
- Create NumPy arrays from Python lists
- Perform vectorized arithmetic that runs 100× faster than Python loops
- Index and slice multi-dimensional arrays
- Compute statistics with
np.mean,np.std,np.histogram
Loading lesson…
Why this matters
Pandas, scikit-learn, PyTorch tensors, and every quant/ML stack sit on numpy's ndarray and its C-level broadcasting. The staff-level skill is spotting Python-level for loops over arrays and rewriting them as vectorized ufuncs — often a 100-1000× speedup and a memory-contiguous win for downstream BLAS calls.
Common pitfalls
- Iterating with
for x in arr— kills the point of numpy; use vectorized ops ornp.vectorizeonly as a last resort. - Mixing dtypes silently — an
int64array + Python float upcasts tofloat64and doubles memory. - Assuming slices are copies —
arr[1:3]is a view; mutating it edits the original. Use.copy()when needed.