Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Python's itertools module might be useful.

Assuming M is the matrix space (m by n matrices over F) and S is the subset of F. The following loop might do the trick:

from itertools import product
for entries in product(S,repeat=m*n):
    m = M( entries )