sympy/sympy — pull request #1120 by mrocklin (2012-03-13 22:24:34+00:00)
Title: added is_square check to is_identity

Before we had the following wrong result

>>> Matrix([[1,0,0]]).is_Identity
True

This was because for all valid i,j index pairs X[i,j] == 1 when i==j and X[i,j] == 0 when i!=j . Added an is_square check which should resolve the issue

http://code.google.com/p/sympy/issues/detail?id=3143