1 | initial version |
Hello Volker,
I do not know, why you want to encode the index j in the name,
but you could use 'exec()' for this:
import numpy as np
N = 4
A = 3
for j in srange(N):
exec('L'+str(j)+"=np.empty(A)")
Then L1 to L4 gets defined:
>>> L1
array([ 9.79748720e-251, 2.90930926e-252, 2.34745402e-251])
2 | fixed receiver |
Hello Volker,mresimulator,
I do not know, why you want to encode the index j in the name,
but you could use 'exec()' for this:
import numpy as np
N = 4
A = 3
for j in srange(N):
exec('L'+str(j)+"=np.empty(A)")
Then L1 to L4 gets defined:
>>> L1
array([ 9.79748720e-251, 2.90930926e-252, 2.34745402e-251])