From 34e8f5a69b92d0d886622679bc82c056d9567901 Mon Sep 17 00:00:00 2001 From: Per A Brodtkorb Date: Mon, 6 Nov 2017 13:48:24 +0100 Subject: [PATCH] pep8 --- wafo/containers.py | 2 +- wafo/sg_filter/_core.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wafo/containers.py b/wafo/containers.py index 4fc4e9a..188fda5 100644 --- a/wafo/containers.py +++ b/wafo/containers.py @@ -523,7 +523,7 @@ def transformdata_1d(x, f, plotflag): transform_id = np.mod(plotflag // 10, 10) transform = [lambda f, x: f, lambda f, x: 1 - f, - cumtrapz(f, x), + cumtrapz, lambda f, x: 1 - cumtrapz(f, x), lambda f, x: np.log(f), lambda f, x: np.log1p(-f), diff --git a/wafo/sg_filter/_core.py b/wafo/sg_filter/_core.py index 454a404..e1cb42c 100644 --- a/wafo/sg_filter/_core.py +++ b/wafo/sg_filter/_core.py @@ -368,7 +368,7 @@ class _Filter(object): z = y if (1 - I).any(): notI = ~I - z, L = distance_transform_edt(notI, return_indices=True) + z, L = distance_transform_edt(notI, return_indices=True) z[notI] = y[L.flat[notI]] # coarse fast smoothing using one-tenth of the DCT coefficients @@ -986,7 +986,7 @@ class Kalman(object): self._set_H(n) try: HI = np.linalg.inv(self.H) - except: + except Exception: HI = np.eye(n) self._set_P(HI) return HI @@ -1112,6 +1112,7 @@ class HampelFilter(object): -pracma.html """ + def __init__(self, dx=None, t=3, adaptive=None, fulloutput=False): self.dx = dx self.t = t