Added reshape! to modify the matrix inplace, where reshape dups the matrix.