| 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 )
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.