def _weightfun_sliding_window(T, params, report):
    """
    Creates the weights for the sliding window method. See func: teneto.derive.derive.
    """
    weightat0 = np.zeros(T)
    weightat0[0:params['windowsize']] = np.ones(params['windowsize'])
    weights = np.array([np.roll(weightat0, i)
                        for i in range(0, T + 1 - params['windowsize'])])
    report['method'] = 'slidingwindow'
    report['slidingwindow'] = params
    report['slidingwindow']['taper'] = 'untapered/uniform'
    return weights, report
def _weightfun_sliding_window ( T , params , report ) : weightat0 = np . zeros ( T ) weightat0 [ 0 : params [ 'windowsize' ] ] = np . ones ( params [ 'windowsize' ] ) weights = np . array ( [ np . roll ( weightat0 , i ) for i in range ( 0 , T + 1 - params [ 'windowsize' ] ) ] ) report [ 'method' ] = 'slidingwindow' report [ 'slidingwindow' ] = params report [ 'slidingwindow' ] [ 'taper' ] = 'untapered/uniform' return weights , report
Creates the weights for the sliding window method. See func: teneto.derive.derive.