Updates:
Status: NeedsDecision
Comment #5 on issue 2270 by [email protected]: Matrix(...) + scalar
http://code.google.com/p/sympy/issues/detail?id=2270
No, I don't think that's a good idea for matrices. numpy does it for
the "wrong" reasons, to be consistent with ndarrays for which it makes
sense due to the broadcasting rules. If we did that, we'd have (X + 1)*Y !=
X*Y + Y, which can be seriously confusing, for instance if the matrices X
and Y are representations of quantum operators.
The eye version is wrong as well, because it can only work for square
matrices.
"In the face of ambiguity, refuse the temptation to guess." Besides, in
mathematics, you can't add a number and a matrix, so you shouldn't be able
to do it in sympy, i.e. A + x should raise a TypeError.
--
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.