SciPy

Scientific computing algorithms built on top of NumPy.

CurrentadvancedGuide only -- no course yet

Overview

SciPy extends NumPy with algorithms for optimization, statistics, signal processing, and linear algebra -- the tools a scientist or engineer would otherwise implement from scratch, built and tested once as a shared library.

What it is
A Python library of scientific-computing algorithms (statistics, optimization, linear algebra) built on NumPy arrays.
Why it's used
For statistical tests, optimization problems, and numerical algorithms that would be error-prone to reimplement from scratch.
Where it fits
Built on NumPy; used alongside Pandas in scientific and statistical data science work.

Core concepts

  • Statistical tests (scipy.stats)
  • Optimization (scipy.optimize)
  • Linear algebra (scipy.linalg)
  • Signal processing

Example

A t-test compares two groups' means -- SciPy provides the tested, correct implementation rather than requiring you to derive the statistics from scratch.

from scipy import stats
result = stats.ttest_ind([23, 25, 22], [30, 32, 29])
print(result.pvalue)

Common use cases

  • Statistical hypothesis testing
  • Numerical optimization
  • Scientific and engineering computation

Project ideas

  • Run a statistical test comparing two small datasets and interpret the result

Official references