moving_window
moving_window(
data: ndarray ,
window: int ,
operation: str ,
axis: int = 0,
engine: Literal[‘auto’, ‘scipy’, ‘bottleneck’] = auto,
mode: str = reflect,
cval: float = 0.0,
origin: int = 0,
min_count: int = 1,
ddof: int = 0,
)-> ‘np.ndarray’
Generic moving window operation with automatic engine selection.
Parameters
| Parameter | Description |
|---|---|
| data : array-like | Input data |
| window : int | Window size |
| operation : str | Operation name (“median”, “mean”, “std”, “sum”, “min”, “max”) |
| axis : int, default 0 | Axis along which to operate |
| engine : {“auto”, “scipy”, “bottleneck”}, default “auto” | Engine to use |
| mode |
Boundary mode. Non-default values use scipy for operations where bottleneck cannot preserve scipy boundary semantics. |
| cval |
Fill value when mode="constant".
|
| origin |
Filter placement. Nonzero values use scipy for operations where bottleneck cannot preserve scipy boundary semantics. |
| min_count | Minimum number of observations in a Bottleneck window. |
| ddof | Delta degrees of freedom for Bottleneck standard deviation. |
Returns
np.ndarray Result of moving window operation