So far, I use following codes for generating a random list with specified boundary:
def initGen(low,upp):
ini=[]
for i in range(len(low)):
ini.append(random.uniform(low[i],upp[i]))
return ini
May somebody suggest a more compact or alternative way to achieve it? Many thanks in advance!!!
Aucun commentaire:
Enregistrer un commentaire