NumPy
9 / 21 posts
Filter by Category
NumPy Cheat Sheet and Next Steps
A one-page NumPy cheat sheet, a practice exercise that combines the whole course, and what to learn next.
NumPy Linear Algebra
Dot products, matrix multiplication with @, transpose, determinant, inverse and solving linear equations in NumPy.
NumPy Statistics
Mean, median, standard deviation, percentiles, min and max in NumPy, along an axis and with missing values.
NumPy Random Numbers
Generate reproducible random integers, floats, choices and normal samples with np.random.default_rng().
NumPy Broadcasting
How NumPy does math between arrays of different shapes, the two broadcasting rules, and a practical example.
NumPy Array Math and ufuncs
Do element-wise arithmetic on whole NumPy arrays, use universal functions, and sum along an axis.
NumPy Searching, Sorting and Filtering
Find values with where(), order arrays with sort() and argsort(), and keep matching elements with boolean masks.
NumPy Joining and Splitting Arrays
Combine NumPy arrays with concatenate(), stack(), hstack() and vstack(), and break them apart with array_split().
NumPy Array Iterating
Loop through NumPy arrays of any dimension with for loops, np.nditer() and np.ndenumerate().