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