ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 20 May 2013 10:00:35 -0500Assigning individual entries of a matrixhttp://ask.sagemath.org/question/10142/assigning-individual-entries-of-a-matrix/I have been using code as follows to compute fundamental weight representations of Lie groups inside $GL(25)$:
D = lambda i: WeylCharacterRing("D{0}".format(i), style = "coroots")
for i in range(2,12):
fw = D(i).fundamental_weights()
deg = D(i)(fw[1]).degree()
print deg
But now I am interested in going through and looking at all `D(i)(fw[j]).degree() for i in range(1,12), j in range(1,len(fw))`
Now this will be quite a set of numbers, so I am wondering how I can pick out the ones that give me `25` and then store the index of that matrix. Right now I have this:
import numpy
deg = numpy.zeros(12)
D = lambda i: WeylCharacterRing("D{0}".format(i), style = "coroots")
for i in range(2,12):
fw = D(i).fundamental_weights()
for j in range(1,len(fw)):
deg[i,j] = D(i)(fw[j]).degree()
print deg
But this doesn't work. Is my syntax off?JoshIzzardMon, 20 May 2013 10:00:35 -0500http://ask.sagemath.org/question/10142/