0
Hello, I'm trying to make a simple iteration to get 1000 vectors to used them in another calculation, I >have tried many things but still I'm getting this error of "float" object is not iterable when I'm >using while. Here is my script:類型錯誤:當我使用WHILE
import random
count = 1000
alfa_1 = [0, 1]
alfa_2 = [0, 1]
d = [0, 1]
while count > 0:
print count
for i in range(count):
alfa_1 = random.random() * (max (alfa_1) - min(alfa_1)) + min (alfa_1)
alfa_2 = random.random() * (max(alfa_2) - min(alfa_2)) + min (alfa_2)
d = random.random() * (max(d) - min(d)) + min(d)
paramvect = [alfa_1, alfa_2, d]
print paramvect
count = count - 1
Thanks for any help you can provide!