ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 24 Feb 2013 12:03:22 +0100How are list of matrices printed by sage?https://ask.sagemath.org/question/9837/how-are-list-of-matrices-printed-by-sage/If I construct a list of matrices and let sage print it, the matrices are (correctly) aligned on the top:
sage: A=matrix([[1,2],[3,4]])
sage: [A,A]
[
[1 2] [1 2]
[3 4], [3 4]
]
Howewer, this is not the output of the __repr__ function of a list: compare:
sage: print [A,A].__repr__()
[[1 2]
[3 4], [1 2]
[3 4]]
I would like to construct an object whose output is on more than one lines (like a matrix), and I would like a list of these objects to be printed aligned on the top (like with the matrices in the first example above). How can I do that?
antoSun, 24 Feb 2013 12:03:22 +0100https://ask.sagemath.org/question/9837/