CoCalc Public Filessupport / 2015-05-20-matrices.sagewsOpen in with one click!
Author: William A. Stein
Description: Jupyter notebook support/2015-06-04-141749-bokeh.ipynb

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

v = [] for x in cartesian_product_iterator([[0,1,-1]]*9): v.append(matrix(3,x))
len(v)
19683
v[0]
[0 0 0] [0 0 0] [0 0 0]
v[10]
[0 0 0] [0 0 0] [1 0 1]