Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Regarding remove() function

I want to remove all symmetric matrices from the list of all possible 0,1 matrices of (say) 2nd order. When I run this code, not all symmetric matrices are removed. Where am I wrong?`

        T=Tuples((0,1),4)
        W=[matrix(2,2,v) for v in T]
        [W.remove(s) for s in W if s.is_symmetric() is true]
        show(W)