Comment #11 on issue 2865 by [email protected]: str(Matrix(...)) should give "Matrix(...)"
http://code.google.com/p/sympy/issues/detail?id=2865

Current documentation says str should look nice, repr should play nice with eval. Nowhere (from what's been quoted) does it say that one should be able to copy and sympify what has been printed.

So currently, repr for Matrix is what is broken since it should return what can be eval'ed and it doesn't. It returns the repr of str:

m=randMatrix(2,2)
m
[21,  2]
[75, 95]
repr(m)
'[21,  2]\n[75, 95]'

So if I change my work to make repr(m) give `Matrix([[21, 2], [75, 95]])`, would that be agreeable?

We can then either 1) update the str docstring to say that sympify should be able to interpret the str form or 2) make sympify able to parse a matrix...and that's going to be a headache for expressions whereas my current implementation is going to make that fairly easy.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" 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/sympy-issues?hl=en.

Reply via email to