Comment #13 on issue 2106 by mipavelka: Matrix of shape (1,1) and a number can't be added
http://code.google.com/p/sympy/issues/detail?id=2106
Well, I think that if SymPy distinguishes between 1x1 matrices and scalars, the Matrix.trace() function, for example, should be redefined. Because the trace operator is just complete contraction of a tensor which leads to a zero order tensor. But zero order tensors are in fact 1x1 matrices. Matrix.trace(), however, returns a scalar while it should return a 1x1 matrix if 1x1 matrices and scalars were treated differently in SymPy.
Of course, I don't think that it would be a good idea to return a 1x1 matrix from the trace() function. But I can't see any mathematical difference between 1x1 matrices and scalars and hence I still can't see a reason to distinguish them in SymPy.
-- 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.
