Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium Matrices Printing CodeInCategory-Code
CodeInDifficulty-Easy
New issue 2865 by asmeu...@gmail.com: str(Matrix(...)) should give
Matrix(...)
http://code.google.com/p/sympy/issues/detail?id=2865
The string printer for Matrix returns a 2-D representation:
In [32]: str(Matrix([[1, 2], [3, 4]]))
Out[32]:
[1, 2]
[3, 4]
But this is wrong. If you want that, you should use the pretty printer.
str() should give something that can be used to copy and paste, so in this
case, it should just return "Matrix([[1, 2], [3, 4]])".
Also, note that for empty matrices, this should return some kind of
canonical form. For shape == (n, 0), it can return Matrix([[], [], ...,
[]]). I'm not sure what the best way to do shape == (0, n) is at the
moment. I guess it should use some kind of Matrix(0, n, something).
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.