Reformat long lines in matrix.py