Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New 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
Hi, I would like to add a number and and inner product of two vectors:
v = Matrix([[1,1]])
w = Matrix([2,2])
result = 1 + v*w
But an error occurs because int type does not have the shape attribute.
Adding lines
421 try:
422 a.shape
423 except AttributeError:
424 a = Matrix([a])
to the matrices.matrices.py file seems to help.
However, I'm quiet new to sympy and maybe some problems could be caused by
adding the lines. Do you think it is OK to add the lines?
Attachments:
matrices.py 67.1 KB
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-iss...@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.