From 604ad9e02274a5dca9950480ad9f91cab596f9a3 Mon Sep 17 00:00:00 2001 From: Per A Brodtkorb Date: Mon, 5 Jun 2017 01:07:51 +0200 Subject: [PATCH] pep8 --- wafo/interpolate.py | 6 +++--- wafo/numba_misc.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wafo/interpolate.py b/wafo/interpolate.py index 16e8374..d191657 100644 --- a/wafo/interpolate.py +++ b/wafo/interpolate.py @@ -241,7 +241,7 @@ def sgolay2d(z, window_size, order, derivative=None): zout[:size, :size] = band - np.abs(z[size:0:-1, :][:, size:0:-1] - band) # bottom right corner band = z[-1, -1] - zout[-size:, -size:] = band + np.abs(z[-2:-size - 2:-1, :][:,-2:-size - 2:-1] - band) + zout[-size:, -size:] = band + np.abs(z[-2:-size - 2:-1, :][:, -2:-size - 2:-1] - band) # top right corner band = zout[size, -size:] zout[:size, -size:] = band - np.abs(zout[2 * size:size:-1, -size:] - band) @@ -251,8 +251,8 @@ def sgolay2d(z, window_size, order, derivative=None): return zout def _get_sign_and_dims(derivative): - sign = {None:1}.get(derivative, -1) - dims = {None:(0, ), 'col':(1, ), 'row':(2, ), 'both':(1, 2)}[derivative] + sign = {None: 1}.get(derivative, -1) + dims = {None: (0, ), 'col': (1, ), 'row': (2, ), 'both': (1, 2)}[derivative] return sign, dims def _build_matrix(order, window_size, size): diff --git a/wafo/numba_misc.py b/wafo/numba_misc.py index 496e504..524a9fa 100644 --- a/wafo/numba_misc.py +++ b/wafo/numba_misc.py @@ -52,7 +52,7 @@ def findcross(xn): def _make_findrfc(cmp1, cmp2): @jit(int64(int64[:], float64[:], float64), nopython=True) - def findrfc2(t, y, h): + def local_findrfc(t, y, h): # cmp1, cmp2 = (a_le_b, a_lt_b) if method==0 else (a_lt_b, a_le_b) n = len(y) @@ -105,7 +105,7 @@ def _make_findrfc(cmp1, cmp2): j += 1 t[j] = t0 return j + 1 - return findrfc2 + return local_findrfc @jit(int32(float64, float64), nopython=True)