Had to ensure that the wavelet input matrix were square and power of two