def exponential_weights(length, decay_rate):
 return (full(length, decay_rate, float64_dtype) ** arange((length + 1), 1, (-1)))

def exponential_weights ( length , decay_rate ) : return ( full ( length , decay_rate , float64_dtype ) ** arange ( ( length + 1 ) , 1 , ( - 1 ) ) )
build a weight vector for an exponentially-weighted statistic .