Modify copy_matrix and transpose.