{"id":2448,"library":"coreforecast","title":"coreforecast","description":"coreforecast is a Python library that provides fast C++ implementations of common forecasting routines, particularly useful for transforming time series data in a grouped fashion. It's often leveraged internally by higher-level Nixtla libraries like MLForecast, StatsForecast, and NeuralForecast to achieve high performance. The current version is 0.0.17, released on February 24, 2026. Given its 'Alpha' development status, releases appear to be on an as-needed basis rather than a fixed cadence.","status":"active","version":"0.0.17","language":"en","source_language":"en","source_url":"https://github.com/Nixtla/coreforecast","tags":["forecasting","time-series","performance","c++","numpy","nixtla"],"install":[{"cmd":"pip install coreforecast","lang":"bash","label":"PyPI"},{"cmd":"conda install -c conda-forge coreforecast","lang":"bash","label":"Conda-forge"}],"dependencies":[{"reason":"Required for the core data structures (GroupedArray) and numerical operations.","package":"numpy","optional":false}],"imports":[{"symbol":"GroupedArray","correct":"from coreforecast.grouped_array import GroupedArray"},{"symbol":"ExpandingMean","correct":"from coreforecast.lag_transforms import ExpandingMean"},{"symbol":"LocalStandardScaler","correct":"from coreforecast.scalers import LocalStandardScaler"}],"quickstart":{"code":"import numpy as np\nfrom coreforecast.grouped_array import GroupedArray\nfrom coreforecast.lag_transforms import ExpandingMean\nfrom coreforecast.scalers import LocalStandardScaler\n\n# The base data structure is the \"grouped array\"\n# data: values of the series\n# indptr: series boundaries such that data[indptr[i] : indptr[i + 1]] returns the i-th series.\n# For example, if you have two series of sizes 3 and 7, indptr would be [0, 3, 10].\ndata = np.arange(10).astype(np.float32)\nindptr = np.array([0, 3, 10], dtype=np.int32)\nga = GroupedArray(data, indptr)\n\n# Apply transformations\nexp_mean = ExpandingMean(lag=1).transform(ga)\nscaler = LocalStandardScaler().fit(ga)\nstandardized = scaler.transform(ga)\n\nprint(\"Original data:\", data)\nprint(\"GroupedArray indptr:\", indptr)\nprint(\"Expanding Mean:\", exp_mean)\nprint(\"Standardized data (first group):\")\nprint(standardized.data[standardized.indptr[0]:standardized.indptr[1]])","lang":"python","description":"This quickstart demonstrates the core usage of `coreforecast` by creating a `GroupedArray` and applying an `ExpandingMean` lag transformation and a `LocalStandardScaler`."},"warnings":[{"fix":"Consider if you truly need to use coreforecast directly, or if a higher-level library from Nixtlaverse better suits your use case.","message":"coreforecast is primarily a low-level dependency. Most users will interact with it indirectly through higher-level Nixtla libraries like MLForecast, StatsForecast, or NeuralForecast. Direct usage is for specific C++ operator needs.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure you are using compatible versions of coreforecast and any dependent Nixtla libraries. Check the documentation or GitHub issues of the higher-level library for recommended coreforecast versions. Upgrading all Nixtla libraries to their latest versions is generally recommended.","message":"Version incompatibilities between coreforecast and other Nixtla libraries (e.g., mlforecast) can lead to 'AttributeError'. For instance, mlforecast==0.11.6 might not be compatible with older coreforecast versions.","severity":"breaking","affected_versions":"Prior to 0.0.17 and specific mlforecast versions (e.g., mlforecast<0.12.0 with coreforecast<0.0.14)"},{"fix":"Carefully construct the `indptr` array such that `data[indptr[i] : indptr[i + 1]]` correctly isolates each time series within the `data` array.","message":"The `GroupedArray` data structure expects `data` and `indptr` to be 1D NumPy arrays. Incorrectly structuring `indptr` (e.g., not matching group boundaries) will lead to incorrect calculations or errors.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-10T00:00:00.000Z","next_check":"2026-07-09T00:00:00.000Z"}