|
I didn't get why
Isn't part of the 'setup' section of the code. If this is run twice, doesn't it reset te values of 'p'? I thought you should run the code once (finish with an array of 'p'), and then run it again using the previous 'p' as a starting point. |
The question has been closed for the following reason "The question is answered, right answer was accepted" by Gian Carlo Martinelli 10 Mar '12, 20:10
|
Same question here! Anyone? |
Also, I tried creating a function that starts like this:
def run_filter():
p2 = []
for i in range(N):
p2.append(p[i].move(0.1, 5.0))
p = p2
I get an error: UnboundLocalError: local variable 'p' referenced before assignment
This didn't make any sense to me. Isn't 'p' a global variable?