I am trying to calculate the character table of a finite field. The following is my code:
def character_table(q,n):
k=GF(q^n)
tr(x)=sum[(x^(q^i) for i in [0..n-1])]
L=[tr(x) for x in K]
ksi = e^(2*pi*I/n)
chi(x)=ksi^(tr(x))
for a in K:
L_a = [chi(a*x) for x in K]
print L_a
And the TypeError is 'function' object has no attribute '__getitem__'. Can somebody help me how to fix the code?
Thanks
Blockquote