Matrix cross correlation in python I'm currently performing matrix cross correlation in python using :

C = scipy.signal.correlate2d(A,A)


where A is a 2D matrix, typically a picture. As you can imagine, it gets very long for large array, such that I'm looking for something faster.

Any hint ?
I also heard about scipy.signal.fftconvolve. Despite that it's much more rapid, it rarely give me the same result at the end.
scipy.signal.correlate2d(A,A) and scipy.signal.fftconvolve(A,A[::-1, ::-1]) will give the same result. The second one is much, much faster.