finds.dev← search

// the find

stumpy-dev/stumpy

★ 4,105 · Python · NOASSERTION · updated Jun 2026

STUMPY is a powerful and scalable Python library for modern time series analysis

STUMPY is a Python library for computing the matrix profile — a data structure that encodes pairwise nearest-neighbor distances between subsequences in a time series. From that single structure you get motif discovery, anomaly detection, semantic segmentation, and more. It's aimed at data scientists and researchers doing time series analysis who want something faster than rolling their own O(n²) implementations.

The performance story is real: Numba JIT compilation gets you near-C speeds on CPU, and the GPU path (via CUDA through Numba) can process billions of comparisons in minutes. The Dask integration for distributed computation is a first-class citizen, not an afterthought — stumped() mirrors the stump() API exactly. Test coverage is claimed at 100% and the test suite has a naive.py with reference implementations to validate against, which is the right way to test numerically sensitive code. The tutorial set is genuinely thorough — 11 Jupyter notebooks covering every major use case with real data.

The algorithm has one sharp edge that bites everyone: you must choose a window size m upfront, and the results are highly sensitive to it. The pan matrix profile helps, but it's still on you to reason about what 'a pattern' looks like in your domain. Numba's JIT compilation means the first call on a fresh process takes 10-60 seconds to compile — painful in notebook workflows where you restart the kernel constantly. The non-normalized (AAMP) variants are a separate parallel API with their own function names rather than a flag, which doubles the surface area you need to learn. And for very large time series on CPU (n > 10^6), runtimes are measured in hours — the performance table makes this clear, but it's easy to miss until you're already waiting.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →