#1918: [with patch, needs review] Matrices that are printed are not aligned
----------------------------+-----------------------------------------------
Reporter: jason | Owner: was
Type: enhancement | Status: new
Priority: major | Milestone: sage-4.1.1
Component: linear algebra | Keywords:
Reviewer: | Author:
Merged: |
----------------------------+-----------------------------------------------
Comment(by wcauchois):
I did some work to alleviate this issue, including implementing a new
displayhook. The displayhook looks at every list, and if any object's repr
spans multiple lines it prints the whole list out in a special format. See
for yourself:
{{{
sage: list(MatrixSpace(GF(2),2))
[
[0 0] [1 0] [0 1] [0 0] [0 0] [1 1] [1 0] [1 0] [0 1] [0 1]
[0 0], [0 0], [0 0], [1 0], [0 1], [0 0], [1 0], [0 1], [1 0], [0 1],
[0 0] [1 1] [1 1] [1 0] [0 1] [1 1]
[1 1], [1 0], [0 1], [1 1], [1 1], [1 1]
]
}}}
I discovered that IPython has a separate displayhook mechanism -- however,
the Sage instance spawned for the notebook does not use IPython. Hence, my
code has two separate paths. I tried to ensure that the behavior of the
default displayhook would be maintained in any case. I do hope it doesn't
break anything :).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/1918#comment:3>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---