Another attempt on numba_misc.py

master
Per A Brodtkorb 8 years ago
parent af2581fee0
commit 01ce312e84

@ -30,15 +30,12 @@ def _find_first_cross(ind, y, ix, dcross, start):
ix += 1 ix += 1
dcross = 1 # The next crossing is a down-crossing dcross = 1 # The next crossing is a down-crossing
break break
out[0] = ix
out[1] = dcross
out[2] = start
@jit(int64(int64[:], int8[:])) @jit(int64(int64[:], int8[:]))
def _findcross(ind, y): def _findcross(ind, y):
v = 0 ix, dcross, start, v = 0, 0, 0, 0
ix, dcross, start = _find_first_cross(ind, y) _find_first_cross(ind, y, ix, dcross, start)
n = len(y) n = len(y)
for i in range(start, n - 1): for i in range(start, n - 1):
if ((dcross == -1 and y[i] <= v and v < y[i + 1]) or if ((dcross == -1 and y[i] <= v and v < y[i + 1]) or

Loading…
Cancel
Save