I have a 2D array of eeg data with shape (64,512) - 64 electrodes, 512 timepoints
I want to calculate the maximum cross correlation (irrespective of lag/time shift) between every single electrode, so I end up with a 64x64 array containing max cross correlation values between all pairs
Is there an efficient way of doing this in python/numpy/scipy without iterating through all pairs of electrodes?
I tried using scipy.signal.correlate2d
but I'm not sure its doing what I think its doing as I end up with a 2D array of size 127x1023 rather than 64x64:
from scipy import signal
import numpy as np
data = np.random.randint(1,100,(64,512))
xcorr = signal.correlate2d(data,data)