def ccf(x, y, unbiased=True):
    'cross-correlation function for 1d\n\n    Parameters\n    ----------\n    x, y : arrays\n       time series data\n    unbiased : boolean\n       if True, then denominators for autocovariance is n-k, otherwise n\n\n    Returns\n    -------\n    ccf : array\n        cross-correlation function of x and y\n\n    Notes\n    -----\n    This is based np.correlate which does full convolution. For very long time\n    series it is recommended to use fft convolution instead.\n\n    If unbiased is true, the denominator for the autocovariance is adjusted\n    but the autocorrelation is not an unbiased estimtor.\n\n    '
    cvf = ccovf(x, y, unbiased=unbiased, demean=True)
    return (cvf / (np.std(x) * np.std(y)))
cross-correlation function for 1d

Parameters
----------
x, y : arrays
   time series data
unbiased : boolean
   if True, then denominators for autocovariance is n-k, otherwise n

Returns
-------
ccf : array
    cross-correlation function of x and y

Notes
-----
This is based np.correlate which does full convolution. For very long time
series it is recommended to use fft convolution instead.

If unbiased is true, the denominator for the autocovariance is adjusted
but the autocorrelation is not an unbiased estimtor.
def ccf(x, y, unbiased=True):
    'cross-correlation function for 1d\n\n    Parameters\n    ----------\n    x, y : arrays\n       time series data\n    unbiased : boolean\n       if True, then denominators for autocovariance is n-k, otherwise n\n\n    Returns\n    -------\n    ccf : array\n        cross-correlation function of x and y\n\n    Notes\n    -----\n    This is based np.correlate which does full convolution. For very long time\n    series it is recommended to use fft convolution instead.\n\n    If unbiased is true, the denominator for the autocovariance is adjusted\n    but the autocorrelation is not an unbiased estimtor.\n\n    '
    cvf = ccovf(x, y, unbiased=unbiased, demean=True)
    return (cvf / (np.std(x) * np.std(y)))