def acovf_fft(x, demean=True):
 from scipy import signal
 x = np.asarray(x)
 if demean:
  x = (x - x.mean())
 (signal.fftconvolve(x, x[::(-1)])[(len(x) - 1):(len(x) + 10)] / x.shape[0])

def acovf_fft ( x , demean = True ) : from scipy import signal x = np . asarray ( x ) if demean : x = ( x - x . mean ( ) ) ( signal . fftconvolve ( x , x [ : : ( - 1 ) ] ) [ ( len ( x ) - 1 ) : ( len ( x ) + 10 ) ] / x . shape [ 0 ] )
autocovariance function with call to fftconvolve .