1 | initial version |
Well, you could use the matrix_from_columns
method:
sage: A = matrix(3, 3, range(9))
sage: A
[0 1 2]
[3 4 5]
[6 7 8]
sage: A.matrix_from_columns(range(2,-1,-1))
[2 1 0]
[5 4 3]
[8 7 6]
Or you could take the transpose, use your idea to flip upside down, and then take another transpose:
sage: A.transpose()[::-1,:].transpose()
[2 1 0]
[5 4 3]
[8 7 6]