comnum.moving_average#

comnum.moving_average(x, n)#

Centred moving average over n samples with zeros outside (OptiCommPy movingAverage).

Parameters:
  • x (array_like) – the signal.

  • n (int) – the window length (samples).

Returns:

the averaged signal, of the length of x (complex128).

Return type:

numpy.ndarray

Raises:

ValueError – for an input that is not an array of numbers of the expected shape.