Status: Accepted
Owner: [email protected]
Labels: Type-Defect Priority-Medium EasyToFix smichr

New issue 2731 by [email protected]: zeros(3,0)*zeros(0,3) should give zeros(3,3)
http://code.google.com/p/sympy/issues/detail?id=2731

zeros(3,0)*zeros(0,3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "sympy\matrices\matrices.py", line 396, in __mul__
    return matrix_multiply(self,a)
  File "sympy\matrices\matrices.py", line 2642, in matrix_multiply
    return Matrix(A.shape[0], B.shape[1], lambda i, j:
  File "sympy\matrices\matrices.py", line 76, in __init__
    self.mat.append(sympify(operation(i, j)))
  File "sympy\matrices\matrices.py", line 2646, in <lambda>
    blst[j])))
TypeError: reduce() of empty sequence with no initial value

From the wikipedia page on Matrix, http://en.wikipedia.org/wiki/Matrix_(mathematics)#Empty_matrices

For example, if A is a 3-by-0 matrix A and B is a 0-by-3 matrix, then AB is the 3-by-3 zero matrix corresponding to the null map from a 3-dimensional space V to itself, while BA is a 0-by-0 matrix.

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