SciPy is the scientific-computing layer of the Python data stack. Where NumPy gives you fast arrays, SciPy adds the algorithms built on them — statistics, optimisation, integration, interpolation, signal processing and more. If you've done the NumPy course, SciPy is the natural next step toward real numerical and scientific work.
What is SciPy?
SciPy is a collection of trusted, battle-tested implementations of classic numerical algorithms — the kind you'd otherwise have to code (badly) yourself. It's organised into focused submodules, each covering one area of maths or science.
SciPy vs NumPy
| Library | Provides |
|---|---|
| NumPy | The array (ndarray) + basic operations, simple linear algebra |
| SciPy | Higher-level algorithms on those arrays: stats, optimisation, integration… |
They're partners, not rivals — SciPy is built directly on NumPy arrays. You'll almost always import numpy as np alongside whichever SciPy submodule you need.
The submodule map
scipy.stats— distributions & statistical testsscipy.optimize— minimise functions, fit curves, find rootsscipy.integrate— numerical integration & ODEsscipy.interpolate— fill in values between data pointsscipy.linalg— advanced linear algebrascipy.signal,scipy.fft,scipy.spatial— signals, transforms, geometry
Importing & using
Import the specific submodule you need — SciPy is large, so you don't import it all:
import numpy as npfrom scipy import stats, optimize, integrate# Each submodule is a toolbox you reach intodata = np.array([2.1, 3.4, 1.9, 5.0, 4.2])stats.describe(data) # count, mean, variance, skew, kurtosis
Practice
Create a NumPy array of 10 numbers and pass it to scipy.stats.describe. Read the output — mean, variance, skew — and match each field to what you learned in the statistics tutorial.
Key takeaways
- 01SciPy is the scientific-computing layer built on top of NumPy arrays.
- 02NumPy provides the array; SciPy provides higher-level algorithms on it.
- 03It is organised into focused submodules: stats, optimize, integrate, interpolate, linalg…
- 04Import the specific submodule you need — from scipy import stats.
- 05Learn the submodule map rather than memorising functions; open the right toolbox per task.
