rolling.rolling_mean
- rolling.rolling_mean(a: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], *, window: int | tuple[int, ...] | list[int] | ndarray[tuple[int, ...], bool] | Window, reduce: bool = False) ndarray
Takes an array and returns the rolling mean. Not suitable for arrays with NaN values.
- Parameters:
a (array-like) – Array to create the sliding window view from.
window (int, array-like, Window) – Window that is applied over a. It can be an integer or a sequence of integers, which will be interpreted as a rectangular window, a boolean array or a
pyspatialstats.windows.Windowobject.reduce (bool, optional) – Reuse data if set to False (which is the default) in which case an array will be returned with dimensions that are close to the input array. If set to True, every entry is used exactly once, meaning that the sliding windows do not overlap each other. This creating much smaller output array.
- Returns:
Rolling mean over array a. Resulting shape depends on reduce parameter. See :stat_func:`rolling_window` for documentation.
- Return type: