Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 2884 by [email protected]: out of range matrix index doesn't raise error
http://code.google.com/p/sympy/issues/detail?id=2884

m=Matrix([[1,2],[3,4]])
m[m.rows,m.rows]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "sympy\matrices\matrices.py", line 249, in __getitem__
    i, j = self.key2ij((i, j))
  File "sympy\matrices\matrices.py", line 153, in key2ij
    raise IndexError("Index out of range: a[%s]"%repr(key))
IndexError: Index out of range: a[(2, 2)]
m[m.rows,:]
[]

Shouldn't that last line raise an error?

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