revise class Convolve()

No need for a class. It just provides two functions for convolution in 1d and 2d. However, these functions share some common infrastructure.