| 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])
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.