*c*, the script would look like this:

crossings = [] for i in range(1, len(X)): if X[i-1] < c and X[i] >= c: crossings.append(i)

Note that since all I really need for my script are the number of times this happens, I could just initialize "[I]crossings[/I]" to 0 and increment it by 1 every time the "

*if*" statement returns True.

The problem is that this is a very slow process. What array method can I use in numpy or scipy to do this at a faster rate?