--- id: window-ops version: "0.0.15" license: Apache Software License 2.0 license_treatment: permissive maintenance: dormant --- # window-ops — Implementations of window operations such as rolling and expanding. License: permissive · Maintenance: dormant · Downloads: 215.8K/mo ## What it is and what it does window-ops wraps numba-compiled functions to compute rolling, expanding, and seasonal window statistics on numpy arrays. It targets the same operations as pandas rolling and expanding methods but trades pandas' flexibility for raw speed on numeric arrays. The library includes both batch transformations (returning an array of the same length as the input) and online classes that maintain state and emit one result per update, useful for streaming or incremental scenarios. The package depends on numba and numpy; numba's JIT compilation happens at first call. It supports Python 3.6 through 3.10 and is permissively licensed under Apache 2.0. Maintenance is dormant—the last release was in March 2024 and the repository shows no recent activity—so it is stable for existing use cases but will not receive new features or active bug fixes. Use it for: - Accelerate batch computation of rolling means, max, min, or std on large numeric arrays where pandas is too slow. - Implement streaming window statistics by using online classes (RollingMean, ExpandingMax, etc.) to update results as new samples arrive. - Compute seasonal rolling or expanding operations (e.g., 7-day rolling statistics with a seasonal period) on time-series data. - Replace pandas rolling/expanding calls in performance-critical loops where the overhead of pandas indexing is unacceptable. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides numba-optimized window operations (rolling, expanding, seasonal) on numpy arrays as a faster alternative to pandas rolling and expanding methods, plus online classes for incremental updates. Yes, if you have a specific performance bottleneck with rolling or expanding operations on numpy arrays and can tolerate dormant maintenance. The library is stable, permissively licensed, and offers substantial speedups (4x to 78x in the published benchmarks) for its narrow use case. Not recommended if you need active development, broad window function coverage, or integration with pandas DataFrames. ## Install pip install window-ops uv add window-ops poetry add window-ops ## Installing window-ops Before you install: Low install friction with just two runtime dependencies (numba and numpy). Maintenance is dormant—last commit was 2024-06-02 and no release in over 893 days—so expect no active bug fixes or feature development, though the codebase is stable enough for established use cases. License in practice: Apache Software License 2.0 is permissive, allowing commercial and private use with minimal restrictions; you must include a copy of the license and state any modifications. Quickstart: pip install window-ops import numpy as np from window_ops import rolling_mean arr = np.array([1.0, 2.0, 3.0, 4.0, 5.0]) result = rolling_mean(arr, window_size=2) Verify before relying: - Whether numba's JIT compilation overhead is acceptable for your use case's array sizes and call patterns. - Compatibility with newer numpy/numba versions beyond the last tested release date. ## Package facts - License: Apache Software License 2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 215.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags rolling window operations numpy, expanding window statistics, numba optimized rolling mean, fast window aggregations, seasonal rolling operations, online window statistics, numpy array windowing, performance-optimization, time-series, numba-jit [View on SkillFed](https://skillfed.io/packages/window-ops) · [View on PyPI](https://pypi.org/project/window-ops/)