def test_identity_matrix(self): a = Matrix([ [0, 1, 2, 4], [1, 2, 4, 8], [2, 4, 8, 16], [4, 8, 16, 32] ]) self.assertEqual(Matrix.identity() * a, a)
def test_transpose_identity(self): self.assertEqual(Matrix.identity().transpose(), Matrix.identity())