nessai.utils.stats

Utilities related to statistics.

Module Contents

Functions

rolling_mean(x, N=10)

Compute the rolling mean with a given window size.

nessai.utils.stats.rolling_mean(x, N=10)

Compute the rolling mean with a given window size.

Based on this answer from StackOverflow: https://stackoverflow.com/a/47490020

Parameters
xnumpy.ndarray

Array of samples

Nint

Size of the window over which the rolling mean is computed.

Returns
numpy.ndarray

Array containing the moving average.