--- id: coreforecast version: "0.0.18" license: Apache-2.0 license_treatment: permissive maintenance: active --- # coreforecast — Fast implementations of common forecasting routines License: permissive · Maintenance: active · Downloads: 1.9M/mo ## What it is and what it does Coreforecast is a C++ acceleration library for time-series data transformations, built by Nixtla to replace slower Python and numba-based implementations. It operates on grouped arrays—a compact representation where multiple independent time series are stored in a single flattened numpy array with index pointers marking series boundaries—and applies operations like scaling, lag transforms, rolling statistics, and seasonal decomposition with multithreading support. The library is designed as a backend for higher-level forecasting tools rather than for direct use in most cases. It depends only on numpy and avoids the cold-start overhead and LLVM dependency of numba-based approaches. You interact with it through a grouped-array abstraction and call transformations like LocalStandardScaler or ExpandingMean; the library handles the C++ computation and parallelization internally. Use it for: - Preprocessing large collections of time series for machine-learning forecasting pipelines where scaling and lag features are needed. - Computing expanding-window statistics (mean, standard deviation) across many independent time series efficiently. - Applying rolling-window operations like moving averages to grouped time-series data with minimal Python overhead. - Standardizing or normalizing multiple time series in batch using LocalStandardScaler or similar transformers. - Serving as the computational backbone for higher-level forecasting libraries that need fast grouped transformations. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides fast C++ implementations of time-series transformations and scalers for grouped data, designed to work with numpy arrays and support multithreading. Yes, if you are working with time-series forecasting pipelines and need fast grouped transformations. The library is actively maintained, has no known vulnerabilities, and carries a permissive Apache-2.0 license. However, most users should access it indirectly through mlforecast or similar higher-level libraries rather than using it directly; install it directly only if you need fine-grained control over grouped-array operations or are building a forecasting tool. ## Install pip install coreforecast uv add coreforecast poetry add coreforecast ## Installing coreforecast Before you install: Medium install friction due to compiled wheels across multiple Python versions and platforms. Active maintenance with recent release (36 days ago) and no known vulnerabilities. Single runtime dependency on numpy keeps the footprint minimal. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and note any modifications to the library itself. Quickstart: pip install coreforecast import numpy as np from coreforecast.grouped_array import GroupedArray from coreforecast.scalers import LocalStandardScaler data = np.arange(10) indptr = np.array([0, 3, 10]) ga = GroupedArray(data, indptr) scaler = LocalStandardScaler().fit(ga) standardized = scaler.transform(ga) Requires Python 3.10 or later; wheels are pre-compiled for common platforms but may require a C++ build environment on unsupported architectures. Verify before relying: - Whether the library's multithreading performance gains justify the medium install friction for typical use cases. - How cold-start performance compares to the numba-based approach it was designed to replace. - Whether higher-level libraries like mlforecast are the recommended entry point rather than direct use. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 1.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags time series transformations, grouped array operations, fast forecasting preprocessing, time series scaling, lag transforms, expanding window operations, rolling statistics, time-series, forecasting, performance [View on SkillFed](https://skillfed.io/packages/coreforecast) · [View on PyPI](https://pypi.org/project/coreforecast/)