Comment #14 on issue 2106 by asmeurer: Matrix of shape (1,1) and a number can't be added
http://code.google.com/p/sympy/issues/detail?id=2106

There is a mathematical difference. For example, 3*Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) makes sense, but Matrix([3])*Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) does not. In some situations it is convenient to consider a 1x1 Matrix as the same as a scalar (for example, with the inner product), but understand that this is not the case for all situations.

And usually in a computer algebra system you end up having to make distinctions between objects that are the same mathematically but different in their internal representation more often than the other way around. For example, the concept of immutability doesn't make sense mathematically, but you have to consider it when programming in Python.

--
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