SciPy
Optimisation, integration, statistics and signal processing.
SciPy is taught here in 13 lessons, running from SciPy arrays and NumPy interop through to Choosing SciPy vs specialised libraries. Each lesson takes one topic, shows the working code, and links onward to the next, so the course can be read straight through in order.
| Track | Python & Data Science |
| Lessons | 13 |
| Level | Beginner to intermediate |
| Reading time | about 3 hours |
| Prerequisites | Helpful, but not required: Django |
Lessons
- SciPy arrays and NumPy interopHow SciPy relates to NumPy, what it adds on top of the array type, and how to keep a large problem sparse instead of dense.
- Optimisation and curve fittingminimize for general problems, curve_fit for a model fitted to data, and how to tell a real solution from a local one.
- Statistics and signal processingscipy.stats for distributions, fitting and hypothesis tests; scipy.signal for filter design, zero-phase filtering and peak detection.
- Installing SciPy and the subpackage mapInstall SciPy so it matches your NumPy, then learn which of the fifteen subpackages solves which kind of numerical problem.
- Linear algebra with scipy.linalgSolve systems with the right factorisation, decompose a matrix on purpose, and know when scipy.linalg beats numpy.linalg.
- Sparse matrices in depthBuild COO matrices, convert to CSR or CSC for arithmetic, solve systems with direct and iterative methods, and avoid the memory blow-up of fill-in.
- Interpolation, smoothing and integrationFit a smooth curve through noisy samples, interpolate scattered data in many dimensions, and integrate functions you cannot solve analytically.
- Solving differential equations with solve_ivpIntegrate an initial value problem, pick a solver that matches the physics, detect events, and recognise the cost of an unnecessarily explicit method.
- Root finding and special functionsBracket a root or Newton-iterate towards one, read the return value honestly, and use scipy.special instead of re-deriving the functions yourself.
- Image processing with scipy.ndimageFilter, label, measure and transform N-dimensional arrays, with an eye on the coordinate convention that trips everyone up once.
- Spatial algorithms: KDTree, distances and DelaunayAnswer nearest-neighbour queries quickly, compute distance matrices without loops, triangulate point clouds, and align two sets of vectors.
- FFT and spectral analysis with scipy.fftTransform real signals with rfft, apply an appropriate window, read frequencies correctly, and understand what scipy.fft adds over numpy.fft.
- Choosing SciPy vs specialised librariesDecide between NumPy, SciPy, scikit-learn, statsmodels and networkx, and understand the real cost of using the wrong one.
More in Python & Data Science
Python 3 NumPy pandas Matplotlib Jupyter Notebook Flask FastAPI Django Pillow Python 2.x R Julia
FAQ
How long does the SciPy course take?
It has 13 lessons, about 3 hours of reading. Expect roughly twice that if you type out and run every example.
Do I need prior experience for SciPy?
Not strictly. It helps to have read Django first, because some lessons build on it, but every lesson explains its own assumptions.
What should I read after SciPy?
Continue with Pillow (11 lessons), the next course in Python & Data Science.