stumpy
A powerful and scalable library that can be used for a variety of time series data mining tasks
What it is and what it does
STUMPY is a Python library for computing matrix profiles, a foundational data structure that identifies the nearest neighbor of every subsequence in a time series. Once computed, the matrix profile unlocks a range of time series analysis tasks: discovering repeated patterns (motifs), finding anomalies (discords), performing semantic segmentation, and extracting time series chains. The library is built on numpy, scipy, and numba; numba's JIT compilation provides the speed needed to handle large datasets efficiently. STUMPY offers multiple entry points: stump for single-dimensional data, mstump for multi-dimensional data, gpu_stump for GPU acceleration, and stumped/mstumped for distributed computation via Dask.
The package is designed for researchers, data scientists, and developers working with time series. It supports modern Python versions (3.10+) and runs on Linux, macOS, and Windows. The API is straightforward—typically a single function call with a time series and a window size parameter—and the library is actively maintained with comprehensive documentation and tutorials.
Use it for:
- Discover repeated patterns (motifs) in long time series to identify recurring behaviors or cycles.
- Detect anomalies and outliers by finding subsequences with no close neighbors in the time series.
- Segment time series into distinct regimes or states using semantic segmentation (FLUSS).
- Analyze multi-dimensional time series (e.g., sensor arrays) to find correlated patterns across dimensions.
- Accelerate matrix profile computation on large datasets using GPU or distributed Dask clusters.
- Extract time series chains to understand temporally ordered sequences of repeating patterns.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
STUMPY computes the matrix profile for time series data, enabling pattern discovery, anomaly detection, and other time series mining tasks through efficient algorithms optimized with Numba.
Yes. STUMPY is actively maintained, has no known vulnerabilities, installs with low friction, and is licensed permissively. It fills a specific and well-defined niche in time series analysis. Install it if you need matrix profile computation or the downstream mining tasks it enables; skip it if your time series work is limited to forecasting or simple statistics.
Install
stumpy on PyPI
pip
pip install stumpyuv
uv add stumpypoetry
poetry add stumpyInstalling stumpy
Before you install
Low friction install with pure Python wheels. Active maintenance with recent commits and a solid user base (4143 stars). Requires numpy, scipy, and numba; numba's JIT compilation adds a small first-run overhead but enables the performance gains STUMPY is designed for.
License in practice
BSD-3-Clause is permissive; you can use STUMPY in commercial and proprietary projects with minimal restrictions, provided you include the license text.
Quickstart
import stumpy
import numpy as np
your_time_series = np.random.rand(10000)
window_size = 50
matrix_profile = stumpy.stump(your_time_series, m=window_size)
Numba JIT compilation on first call may take several seconds; ensure numpy and scipy are installed alongside stumpy.
Verify before relying
- Whether GPU support (gpu_stump) requires CUDA toolkit installation or if Numba's CUDA dependencies are automatically resolved.
- Performance characteristics on very long time series (millions of points) compared to approximate methods.
- Whether distributed (stumped, mstumped) functions require Dask to be pre-installed or if they are optional.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — numpy, scipy, numba |
| Maintenance | actively maintained — 187 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 476,268/month — #6,449 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: stumpy-1.14.1-py3-none-any.whl
Keywords: time series, matrix profile, motif, discord
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
pygrinderPyGrinder introduces missing values into…
permissive · top 15,000 on PyPI
pypotsPyPOTS provides machine learning algorithms for…
permissive · top 15,000 on PyPI
pytsPyts provides time series classification…
permissive · top 15,000 on PyPI
lttbDownsamples time series data using the…
permissive · top 15,000 on PyPI
dtaidistanceComputes distance measures between time series…
permissive · top 15,000 on PyPI
time-aware-imputerFills missing values in time-series data while…
permissive · top 15,000 on PyPI
sktimesktime provides a unified interface for time…
permissive · top 5,000 on PyPI
dartsDarts provides forecasting and anomaly…
permissive · top 15,000 on PyPI
rupturesDetects change points in time series and signal…
permissive · top 5,000 on PyPI
tsdownsampleDownsamples large time series datasets to a…
permissive · top 15,000 on PyPI