Input:
import random
import numpy as np
gladList = np.empty((128,5))
for i in range(128):
gladList[i]=(i,random.randint(1000,1500),random.randint(40,80),random.randint(0,100),random.randint(60,100))
print(gladList[i])
expected output: [[ 49. 1169. 63. 70. 74.]] [[ 50. 1134. 80. 23. 70.]] . . .
error at output(at line 2): [[ 0. 1116. 72. 72. 69.]] [[1.000e+00 1.475e+03 6.800e+01 8.600e+01 6.900e+01]] [[ 2. 1443.
60. 53. 75.]] [[ 3. 1309. 80. 34. 91.]] [[ 4. 1020. 45. 32. 61.]]
I dont know why im getting this random numbers at line 2, if i run code again im getting even more errors in arrays. But first error is always at line 2(gladList[1]) its like a virus at my output.
Aucun commentaire:
Enregistrer un commentaire