a = numpy.random.randn(data_length)
b = numpy.zeros(data_length * 2)
b[data_length / 2:data_length / 2 + data_length] = a
c = signal.fftconvolve(b, a[::-1], mode='valid')
d = numpy.correlate(a, a, mode='same')
numpy.allclose(c[:-1], d)
Fast cross correlation method in Python