From 01ce312e84afc8022ebe8adec58561d4f907998a Mon Sep 17 00:00:00 2001 From: Per A Brodtkorb Date: Tue, 6 Jun 2017 11:58:55 +0200 Subject: [PATCH] Another attempt on numba_misc.py --- wafo/numba_misc.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/wafo/numba_misc.py b/wafo/numba_misc.py index c907032..74e86fd 100644 --- a/wafo/numba_misc.py +++ b/wafo/numba_misc.py @@ -30,15 +30,12 @@ def _find_first_cross(ind, y, ix, dcross, start): ix += 1 dcross = 1 # The next crossing is a down-crossing break - out[0] = ix - out[1] = dcross - out[2] = start @jit(int64(int64[:], int8[:])) def _findcross(ind, y): - v = 0 - ix, dcross, start = _find_first_cross(ind, y) + ix, dcross, start, v = 0, 0, 0, 0 + _find_first_cross(ind, y, ix, dcross, start) n = len(y) for i in range(start, n - 1): if ((dcross == -1 and y[i] <= v and v < y[i + 1]) or