Previous topic

scikits.timeseries.lib.moving_funcs.cmov_average

Next topic

scikits.timeseries.lib.moving_funcs.cmov_window

This Page

scikits.timeseries.lib.moving_funcs.cmov_mean

cmov_mean(data, span)

Computes the centered moving average of size span on the data.

Parameters:

data : array-like

Input data, as a sequence or (subclass of) ndarray. Masked arrays and TimeSeries objects are also accepted. The input array should be 1D or 2D at most. If the input array is 2D, the function is applied on each column.

span : int

Size of the filtering window.

Returns:

A (subclass of) MaskedArray. :

Noting ``k=span//2``, the ``k`` first and ``k`` last data are always masked. :

If ``data`` has a missing value at position ``i``, then the result has :

missing values in the interval ``[i-k:i+k+1]``. :