I'm trying to understand how numpy.convolve of two one dimensional arrays works ?
>>> np.convolve([1, 2, 3], [0, 1, 0.5])
array([0. , 1. , 2.5, 4. , 1.5])
>>> np.convolve([1,2,3],[0,1,0.5], 'same')
array([1. , 2.5, 4. ])
>>> np.convolve([1,2,3],[0,1,0.5], 'valid')
array([2.5])
Any source or explanation how to convolve two matrix mathematically will be helpful. I tried arranging one signal matrix by arranging decreasing combination and multiplying with other matrix but answers didn't match with one computed programatically.