I am trying to use scipy.ndimage.correlate to replicate the output of IDL convol() function. The IDL function only calculates elements where there is full overlap between the input and the kernel.
So, for example if
input = np.array([[1,2,3],[4,5,6],[7,8,9]]]
kernel = np.array([[0,0,0],[0,1,0],[0,0,0]])
scipy.ndarrayndimage.correlate(input, kernel) = [[0,0,0],[0,5,0],[0,0,0]]
Is this possible?