#numpy
- 27 Feb 2024 · Study
NumPy · Random numbers
The Generator API (default_rng), seeding for reproducibility, distributions, shuffling, and sampling without replacement.
- 22 Feb 2024 · Study
NumPy · Linear algebra
Matrix multiplication with @, solving linear systems, inverse vs solve, determinants, norms, and eigen decomposition.
- 20 Feb 2024 · Study
NumPy · Vectorisation
Replacing Python loops with whole-array operations and ufuncs, with a timing comparison and the axis argument for reductions.
- 15 Feb 2024 · Study
NumPy · Broadcasting
The broadcasting rules that let arrays of different shapes combine, and three uses: centring columns, outer products, and pairwise distances.
- 12 Feb 2024 · Study
NumPy · Boolean and fancy indexing
Selecting with boolean masks and integer arrays, combining conditions with & and |, np.where, and why these return copies.
- 8 Feb 2024 · Study
NumPy · Indexing and slicing
Multi-dimensional indexing with a[i, j], slicing rows and columns, and the most important rule: basic slices are views, not copies.
- 5 Feb 2024 · Study
NumPy · dtypes
NumPy dtypes (int32, int64, float32, float64, bool), memory per element, casting with astype, and silent integer overflow.
- 1 Feb 2024 · Study
NumPy · ndarray basics
The ndarray: creating arrays, shape, ndim, size, reshape, and why one NumPy array beats a list of floats.