Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This :

def FW(B): return [[bool(v) for v in u] for u in matrix(B)+(matrix(B).transpose()*matrix(B))]
B =[[False,True,True,False],[False,False,True,True],[False,False,False,False],[True,False,True,False]]
fw=FW(B)
print(matrix(B))
print("-"*9)
print(matrix(fw))

should do...