The iterations through the rows and columns where flipped. This would cause invalid memory to be accessed and an assertion error in debug mode. Note: This is only fixing an error with non-square matrix printing and has no effect on square matrices. Pull Request: https://projects.blender.org/blender/blender/pulls/118076