STUMPY is a Python library for time series analysis that computes matrix profiles to enable pattern discovery and anomaly detection in sequential data.
Time series analysis often requires finding repeated patterns, detecting anomalies, or segmenting data into meaningful regions. STUMPY addresses this by computing matrix profiles, a data structure that captures the distances between all subsequences in a time series. This approach allows developers to identify motifs (repeated patterns), discover discords (anomalies), and perform segmentation without requiring domain-specific feature engineering. The library uses Numba for fast computation and integrates with Dask to scale across distributed systems, making it practical for both small exploratory analyses and large production workloads.
STUMPY suits projects where you need to analyze temporal patterns in sensor data, financial time series, or other sequential measurements. It is particularly valuable when you want to move beyond simple statistical summaries and discover structural patterns that repeat or deviate significantly from the norm. The library's matrix profile foundation provides a unified framework for multiple analysis tasks rather than requiring separate specialized tools for motif discovery versus anomaly detection versus segmentation.
The project maintains active development with regular updates addressing both core functionality and user-facing improvements. Contributions flow steadily into the codebase, and issues receive consistent attention from maintainers. Documentation is comprehensive and kept current alongside code changes. The project demonstrates responsiveness to user feedback and maintains compatibility with the broader Python data science ecosystem through ongoing integration with libraries like Dask and NumPy.