All tutorials
NumPy tutorials
Fast numerical Python — the ndarray, indexing & boolean masks, vectorization, broadcasting, aggregations and axes.
- Chapters
- 16
- Total reading
- 3h 53m
- Level
- Beginner to Advanced
Chapters
- Chapter 114 min readStart
NumPy Fundamentals
Why NumPy exists, the ndarray, creating arrays, dtypes and shape — the foundation of all Python data work. - Chapter 215 min readStart
Indexing, Slicing & Reshaping
Select and modify parts of an array, filter with boolean masks, and change shape — the skills you use in every analysis. - Chapter 315 min readStart
Vectorization & Broadcasting
Do maths on whole arrays at once, apply universal functions, and let broadcasting combine different shapes elegantly. - Chapter 415 min readStart
Aggregations & Axes
Summarise arrays with sum, mean and friends, control the axis, generate random data, and touch linear algebra. - Chapter 514 min readStart
Combining & Splitting Arrays
Join arrays with concatenate, stack and hstack/vstack, split them back apart, and tile or repeat to build larger arrays. - Chapter 615 min readStart
Advanced (Fancy) Indexing
Select arbitrary elements with integer arrays, index by coordinates, and modify scattered positions at once. - Chapter 714 min readStart
Sorting, Searching & Counting
Sort arrays and get the sorting order, find insertion points, and count unique values — the toolkit for organising data. - Chapter 814 min readStart
Missing Data: NaN & Infinity
Handle the special floating-point values — detect NaN, aggregate around it with nan-aware functions, and clean data safely. - Chapter 916 min readStart
Linear Algebra Deep Dive
The maths behind machine learning — matrix products, solving linear systems, determinants, eigenvalues and the SVD. - Chapter 1015 min readStart
Random Sampling & Simulation
The modern Generator API — draw from distributions, shuffle and sample, and run Monte-Carlo simulations reproducibly. - Chapter 1114 min readStart
Statistics & Histograms
Describe data numerically — percentiles and quantiles, variance and spread, correlation, and binning with histograms. - Chapter 1215 min readStart
Broadcasting Mastery
Go beyond the basics — the newaxis trick, outer operations, meshgrid, and computing pairwise results without loops. - Chapter 1314 min readStart
Structured & Datetime Arrays
Store mixed-type records with structured dtypes, and work with calendar dates using datetime64 and timedelta64. - Chapter 1415 min readStart
Performance, Views & Memory
Understand why NumPy is fast — contiguous memory, views vs copies, in-place operations, and how to avoid needless allocations. - Chapter 1513 min readStart
Saving, Loading & Interoperability
Persist arrays to disk with the .npy/.npz formats, read text and CSV data, and move arrays to and from pandas and lists. - Chapter 1615 min readStart
NumPy in Practice
Bring it together — images and signals as arrays, a normalisation pipeline, common gotchas, and where NumPy hands off to the rest of the stack.
