Ask Your Question
0

Assigning individual entries of a matrix

asked 2013-05-20 17:00:35 +0200

JoshIzzard gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-05-20 17:44:57 +0200

tmonteil gravatar image

What about replacing:

import numpy
deg = numpy.zeros(12)

by:

deg = matrix(ZZ,12)
edit flag offensive delete link more

Comments

Worked great thanks!

JoshIzzard gravatar imageJoshIzzard ( 2013-05-20 18:36:20 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-05-20 17:00:35 +0200

Seen: 235 times

Last updated: May 20 '13