nbo10
November 5th, 2010, 11:58 AM
I have noticed a weired behvior with a piece of code invovling arrays
t1 = 0.001
t2 = 0.1
t3 = 0.5
t4 = 0.001
t5 = 0.25
t = [t1,t2,t3,t4,t5]
W = [1,2,7,8,3,5]
t = t * W[0]
len(t)
returns 0 for the length of t. But if I have t = t / W[0] the length returns 5. What is going on here?
t1 = 0.001
t2 = 0.1
t3 = 0.5
t4 = 0.001
t5 = 0.25
t = [t1,t2,t3,t4,t5]
W = [1,2,7,8,3,5]
t = t * W[0]
len(t)
returns 0 for the length of t. But if I have t = t / W[0] the length returns 5. What is going on here?