Comment #9 on issue 2270 by sherjilo...@gmail.com: Matrix(...) + scalar
http://code.google.com/p/sympy/issues/detail?id=2270
@Andy : An eye is an Idenity matrix so obviously it will add only to the
diagonal. Its `ones` that would add to all the elements.
The eye version is mathematically accurate.
This would still hold, when using the eye scalar addition
(X + 1)*Y == X*Y + Y
@Vincent
Adding 1 to ALL elements is natural for an array, but numpy also does it
with matrix
In [1]: from numpy import *
In [3]: a=matrix(((1,2),(3,4)))
In [4]: a+1
Out[4]:
[[2 3]
[4 5]]
Of course, I don't recommend this at all.
We should implement scalar addition for square matrices using the more
intuitive eye version, as there is such a thing as scalar matrix. See the
link on 6.
Anyone (Ronan ?) still -1 about this ?
--
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.