Documentation Index
Fetch the complete documentation index at: https://nixtlaverse.nixtla.io/llms.txt
Use this file to discover all available pages before exploring further.
expanding_mean
expanding_mean(x, skipna=False)
Compute the expanding_mean of the input array.
Parameters:
| Name | Type | Description | Default |
|---|
x | np.ndarray | Input array. | required |
skipna | bool | If True, exclude NaN values from calculations. When False (default), any NaN value causes the result to be NaN, maintaining backwards compatibility. When True, NaN values are ignored (matching pandas default behavior). | required |
Returns:
| Type | Description |
|---|
| np.ndarray: Array with the expanding statistic | |
Examples:
>>> import numpy as np
>>> x = np.array([1.0, 2.0, np.nan, 4.0, 5.0])
>>> # Default behavior: NaN propagates
>>> expanding_mean(x)
array([1., 1.5, nan, nan, nan])
>>> # With skipna=True: NaN values are excluded
>>> expanding_mean(x, skipna=True)
array([1., 1.5, 1.5, 2.33..., 3.0])
expanding_std
expanding_std(x, skipna=False)
Compute the expanding_std of the input array.
Parameters:
| Name | Type | Description | Default |
|---|
x | np.ndarray | Input array. | required |
skipna | bool | If True, exclude NaN values from calculations. When False (default), any NaN value causes the result to be NaN, maintaining backwards compatibility. When True, NaN values are ignored (matching pandas default behavior). | required |
Returns:
| Type | Description |
|---|
| np.ndarray: Array with the expanding statistic | |
Examples:
>>> import numpy as np
>>> x = np.array([1.0, 2.0, np.nan, 4.0, 5.0])
>>> # Default behavior: NaN propagates
>>> expanding_std(x)
array([1., 1.5, nan, nan, nan])
>>> # With skipna=True: NaN values are excluded
>>> expanding_std(x, skipna=True)
array([1., 1.5, 1.5, 2.33..., 3.0])
expanding_min
expanding_min(x, skipna=False)
Compute the expanding_min of the input array.
Parameters:
| Name | Type | Description | Default |
|---|
x | np.ndarray | Input array. | required |
skipna | bool | If True, exclude NaN values from calculations. When False (default), any NaN value causes the result to be NaN, maintaining backwards compatibility. When True, NaN values are ignored (matching pandas default behavior). | required |
Returns:
| Type | Description |
|---|
| np.ndarray: Array with the expanding statistic | |
Examples:
>>> import numpy as np
>>> x = np.array([1.0, 2.0, np.nan, 4.0, 5.0])
>>> # Default behavior: NaN propagates
>>> expanding_min(x)
array([1., 1.5, nan, nan, nan])
>>> # With skipna=True: NaN values are excluded
>>> expanding_min(x, skipna=True)
array([1., 1.5, 1.5, 2.33..., 3.0])
expanding_max
expanding_max(x, skipna=False)
Compute the expanding_max of the input array.
Parameters:
| Name | Type | Description | Default |
|---|
x | np.ndarray | Input array. | required |
skipna | bool | If True, exclude NaN values from calculations. When False (default), any NaN value causes the result to be NaN, maintaining backwards compatibility. When True, NaN values are ignored (matching pandas default behavior). | required |
Returns:
| Type | Description |
|---|
| np.ndarray: Array with the expanding statistic | |
Examples:
>>> import numpy as np
>>> x = np.array([1.0, 2.0, np.nan, 4.0, 5.0])
>>> # Default behavior: NaN propagates
>>> expanding_max(x)
array([1., 1.5, nan, nan, nan])
>>> # With skipna=True: NaN values are excluded
>>> expanding_max(x, skipna=True)
array([1., 1.5, 1.5, 2.33..., 3.0])
expanding_quantile
expanding_quantile(x, p, skipna=False)
Compute the expanding_quantile of the input array.
Parameters:
| Name | Type | Description | Default |
|---|
x | ndarray | Input array. | required |
p | float | Quantile to compute. | required |
skipna | bool | If True, exclude NaN values from calculations. When False (default), any NaN value causes the result to be NaN, maintaining backwards compatibility. When True, NaN values are ignored (matching pandas default behavior). | False |
Returns:
| Type | Description |
|---|
ndarray | np.ndarray: Array with the expanding statistic |
Examples:
>>> import numpy as np
>>> x = np.array([1.0, 2.0, np.nan, 4.0, 5.0])
>>> # Default behavior: NaN propagates
>>> expanding_quantile(x, 0.5)
array([1., 1.5, nan, nan, nan])
>>> # With skipna=True: NaN values are excluded
>>> expanding_quantile(x, 0.5, skipna=True)
array([1., 1.5, 1.5, 2., 2.5])