modify the dump format of matrices