I am trying to create the set of 3x3 matrices which have entries in the set 
[0,1,-1] 

The simple way to do that would be to create 9 nested loops and run over 
all the possibilities.  

One hopefully better way I could think of doing is possibly this,

from itertools import product
from itertools import izip

A = [(0,0),(0,1),(0,2),(1,0),(1,1),(1,2),(2,0),(2,1),(2,2)]

for a in  product([0,1,-1], repeat = 9):
    B = izip (A,a)


I believe this "B" of mine encodes the matrix as a list of assignments as 
to which matrix entry has gotten which element of the list [0,1,-1] 

But I am not able to convert this B into something that actually is a 
matrix? 
(so that I can say take eigenvalues of it)  


Can someone help?

Also I am running things on the cloud.sage 








-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to