1 | initial version |
It seems that the question is about generating new global variables in code. The correct way to do that is to add them to the globals()
dictionary (has nothing to do with numpy)
sage: import numpy
sage: for i in range(1, 5):
....: variable_name = 'L'+str(i)
....: globals()[variable_name] = numpy.empty(3)
sage: L1
array([ 1.26596386e-312, 1.26596386e-312, 6.90349880e-310])