X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Feja%2Feuclidean_jordan_algebra.py;h=f9da3fab90458b741a3598625e287fced552d0fe;hb=9db2ac0737daced914d4bdad2a63049171bb6e36;hp=fdaccba58a8b99a2f5222054358969ce3e731882;hpb=cef21b24d30d942dbaa542a23aab642c884371f7;p=sage.d.git diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index fdaccba..f9da3fa 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -709,7 +709,7 @@ def _multiplication_table_from_matrix_basis(basis): S = [ vec2mat(b) for b in W.basis() ] Qs = [] - for s in basis: + for s in S: # Brute force the multiplication-by-s matrix by looping # through all elements of the basis and doing the computation # to find out what the corresponding row should be. BEWARE: @@ -718,10 +718,10 @@ def _multiplication_table_from_matrix_basis(basis): # constructor uses ROW vectors and not COLUMN vectors. That's # why we're computing rows here and not columns. Q_rows = [] - for t in basis: + for t in S: this_row = mat2vec((s*t + t*s)/2) Q_rows.append(W.coordinates(this_row)) - Q = matrix(field,Q_rows) + Q = matrix(field, W.dimension(), Q_rows) Qs.append(Q) return Qs