I've got a list of tuples of the form:
freq_chan = [['450.00000000000','2.84445284946706E-003','5.57700603820700E-005',...,'-5.64554015939990E-003','-8.50796429990064E-003','5.07899785310704E-003','-9.27775527763552E-003'],
['455.42024456127','2.90192354894233E-003','6.30296222615586E-005',...,'-6.14834006709138E-003','-9.16215446471028E-003','5.51277485821654E-003','-1.00555510527299E-002'],...]
I am trying to unpack each element using:
f=np.zeros((len(freq_chan_unfolded),n_channels+1))
for i,j in enumerate(freq_chan_unfolded):
for x,y in enumerate(j):
f[i,x] = float(y)
But this returns the error:
for x,y in enumerate(j):
TypeError: 'int' object is not iterable
However, using print(f) in the second for loop seems to show that the unpacking is working fine. It's an error in the outer for loop.