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0,1,1,1,0,0,1,0,0,0,0,1, 1,0,0,0,0,1,1,0,0,0,0,0,1,0,0, 0,0,0,0,1,0,0,0,0,0,1,1,0,1,0, 0,0,1,0,0,1,0,1,0,1,1,0,1,0,0, 0,0,0,1,0,0,1,0,1,1,0,1,1,0,0 ] ) 
       
matExpanded 
       
20 x 15 dense matrix over Finite Field of size 2 (type 'print obj.str()'
to see all of the entries)
20 x 15 dense matrix over Finite Field of size 2 (type 'print obj.str()' to see all of the entries)
print matExpanded.str() 
       
[0 1 1 1 0 0 1 0 0 1 0 0 0 0 1]
[1 0 0 0 1 1 0 0 0 0 0 0 1 0 0]
[0 0 0 0 0 0 0 1 1 0 0 1 0 1 0]
[0 0 0 0 0 0 0 1 0 0 0 0 1 0 0]
[0 0 0 0 0 0 1 0 1 0 0 0 0 0 0]
[0 1 0 1 1 1 1 1 1 1 0 0 0 0 1]
[1 0 0 0 0 1 0 0 0 0 1 1 1 0 0]
[0 0 0 0 1 0 0 1 0 0 1 1 0 1 0]
[0 0 1 0 0 1 0 0 0 0 1 0 1 1 0]
[0 0 0 0 0 0 1 0 0 1 0 1 1 1 0]
[1 0 1 0 1 0 0 0 1 1 0 0 0 0 0]
[1 0 0 0 1 1 0 0 0 0 0 1 1 0 0]
[0 0 0 0 0 0 0 1 1 0 0 0 0 1 0]
[0 0 1 0 0 1 0 0 0 1 1 0 0 1 0]
[0 0 0 0 0 0 1 0 1 0 0 1 0 0 0]
[0 1 0 0 1 1 1 0 0 1 0 0 0 0 1]
[1 0 0 0 0 1 1 0 0 0 0 0 1 0 0]
[0 0 0 0 1 0 0 0 0 0 1 1 0 1 0]
[0 0 1 0 0 1 0 1 0 1 1 0 1 0 0]
[0 0 0 1 0 0 1 0 1 1 0 1 1 0 0]
[0 1 1 1 0 0 1 0 0 1 0 0 0 0 1]
[1 0 0 0 1 1 0 0 0 0 0 0 1 0 0]
[0 0 0 0 0 0 0 1 1 0 0 1 0 1 0]
[0 0 0 0 0 0 0 1 0 0 0 0 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