I'm trying to use the following statement:
if any(dy) < 0:
     print 'do something'
I can see in the array that there a lots of elements < then 0 but still it seems like the program does can't read them and execute the print command. I suppose that is because dy is an array. How can I remedy this problem?

any()is a built-in function that returns a True or False boolean value, and that value is never smaller than0. But given the fact that you use the termarrayhere makes me wonder if you are usingnumpy, which also comes with anany()function. Which one are you using?