Comment #4 on issue 3401 by [email protected]: Slicing an empty matrix is broken
http://code.google.com/p/sympy/issues/detail?id=3401
The issue is that we have the concept of just one of rows or columns being zero. The above matrix has zero rows but three columns. The concept is abstract, but its existence simplifies code that potentially uses it, as it would otherwise have to special case empty matrices.
So A[:, 0] is defined. The : says "take all the rows" (in this case, there are zero of them), and the 0 says "take the first column". The result should be a zero by one matrix.
The problem in the existing code is *not* the 0. That actually works fine It's with the :. The code assumes that : means "all rows from 0 to n - 1, where n is the number of rows". This doesn't work because n = 0, and there are no numbers between 0 and 0 - 1.
-- 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.
