Convolution Function In Python