Convolution in Python