I am new to mathematica. I am looking for an alternative for
I did find functions like
ListConvolve, but it returns a 1D array whereas I expect a 2-dimensional array containing a subset of the discrete linear convolution. Also help me as to how can i specify mode as "same" like in numpy.
Python code (using NumPy)
d = convolve2d(var, kernel, mode="same")
d = ListConvolve[kernel,var]
Thanks in advance.