Skip to content

Commit

Permalink
filters: remove unused kwargs arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeff committed Mar 11, 2018
1 parent 818e344 commit 1d9c1ca
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 25 deletions.
4 changes: 2 additions & 2 deletions pygsp/filters/abspline.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Abspline(Filter):
"""

def __init__(self, G, Nf=6, lpfactor=20, scales=None, **kwargs):
def __init__(self, G, Nf=6, lpfactor=20, scales=None):

def kernel_abspline3(x, alpha, beta, t1, t2):
M = np.array([[1, t1, t1**2, t1**3],
Expand Down Expand Up @@ -98,4 +98,4 @@ def kernel_abspline3(x, alpha, beta, t1, t2):
lminfac = .6 * G.lmin
g[0] = lambda x: gamma_l * gl(x / lminfac)

super(Abspline, self).__init__(G, g, **kwargs)
super(Abspline, self).__init__(G, g)
4 changes: 2 additions & 2 deletions pygsp/filters/expwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Expwin(Filter):
"""

def __init__(self, G, bmax=0.2, a=1., **kwargs):
def __init__(self, G, bmax=0.2, a=1.):

def fx(x, a):
y = np.exp(-float(a)/x)
Expand All @@ -53,4 +53,4 @@ def ffin(x, a):

g = [lambda x: ffin(np.float64(x)/bmax/G.lmax, a)]

super(Expwin, self).__init__(G, g, **kwargs)
super(Expwin, self).__init__(G, g)
4 changes: 2 additions & 2 deletions pygsp/filters/halfcosine.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class HalfCosine(Filter):
"""

def __init__(self, G, Nf=6, **kwargs):
def __init__(self, G, Nf=6):

if Nf <= 2:
raise ValueError('The number of filters must be higher than 2.')
Expand All @@ -45,4 +45,4 @@ def __init__(self, G, Nf=6, **kwargs):
for i in range(Nf):
g.append(lambda x, ind=i: main_window(x - dila_fact/3. * (ind - 2)))

super(HalfCosine, self).__init__(G, g, **kwargs)
super(HalfCosine, self).__init__(G, g)
4 changes: 2 additions & 2 deletions pygsp/filters/heat.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Heat(Filter):
"""

def __init__(self, G, tau=10, normalize=False, **kwargs):
def __init__(self, G, tau=10, normalize=False):

try:
iter(tau)
Expand All @@ -76,4 +76,4 @@ def kernel(x, t):
norm = np.linalg.norm(kernel(G.e, t)) if normalize else 1
g.append(lambda x, t=t, norm=norm: kernel(x, t) / norm)

super(Heat, self).__init__(G, g, **kwargs)
super(Heat, self).__init__(G, g)
4 changes: 2 additions & 2 deletions pygsp/filters/held.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Held(Filter):
"""

def __init__(self, G, a=2./3, **kwargs):
def __init__(self, G, a=2./3):

g = [lambda x: held(x * (2./G.lmax), a)]
g.append(lambda x: np.real(np.sqrt(1 - (held(x * (2./G.lmax), a))
Expand All @@ -67,4 +67,4 @@ def held(val, a):

return y

super(Held, self).__init__(G, g, **kwargs)
super(Held, self).__init__(G, g)
4 changes: 2 additions & 2 deletions pygsp/filters/itersine.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Itersine(Filter):
>>> G.plot_signal(s, ax=axes[1])
"""
def __init__(self, G, Nf=6, overlap=2., **kwargs):
def __init__(self, G, Nf=6, overlap=2.):

def k(x):
return np.sin(0.5*np.pi*np.power(np.cos(x*np.pi), 2)) * ((x >= -0.5)*(x <= 0.5))
Expand All @@ -46,4 +46,4 @@ def k(x):
for i in range(1, Nf + 1):
g.append(lambda x, ind=i: k(x/scale - (ind - overlap/2.)/overlap) / np.sqrt(overlap)*np.sqrt(2))

super(Itersine, self).__init__(G, g, **kwargs)
super(Itersine, self).__init__(G, g)
5 changes: 2 additions & 3 deletions pygsp/filters/mexicanhat.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ class MexicanHat(Filter):
"""

def __init__(self, G, Nf=6, lpfactor=20, scales=None, normalize=False,
**kwargs):
def __init__(self, G, Nf=6, lpfactor=20, scales=None, normalize=False):

lmin = G.lmax / lpfactor

Expand All @@ -82,4 +81,4 @@ def kernel(x, i=i):

kernels.append(kernel)

super(MexicanHat, self).__init__(G, kernels, **kwargs)
super(MexicanHat, self).__init__(G, kernels)
4 changes: 2 additions & 2 deletions pygsp/filters/meyer.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Meyer(Filter):
"""

def __init__(self, G, Nf=6, scales=None, **kwargs):
def __init__(self, G, Nf=6, scales=None):

if scales is None:
scales = (4./(3 * G.lmax)) * np.power(2., np.arange(Nf-2, -1, -1))
Expand Down Expand Up @@ -90,4 +90,4 @@ def v(x):

return r

super(Meyer, self).__init__(G, g, **kwargs)
super(Meyer, self).__init__(G, g)
4 changes: 2 additions & 2 deletions pygsp/filters/papadakis.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Papadakis(Filter):
>>> G.plot_signal(s, ax=axes[1])
"""
def __init__(self, G, a=0.75, **kwargs):
def __init__(self, G, a=0.75):

g = [lambda x: papadakis(x * (2./G.lmax), a)]
g.append(lambda x: np.real(np.sqrt(1 - (papadakis(x*(2./G.lmax), a)) **
Expand All @@ -61,4 +61,4 @@ def papadakis(val, a):

return y

super(Papadakis, self).__init__(G, g, **kwargs)
super(Papadakis, self).__init__(G, g)
4 changes: 2 additions & 2 deletions pygsp/filters/regular.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Regular(Filter):
>>> G.plot_signal(s, ax=axes[1])
"""
def __init__(self, G, d=3, **kwargs):
def __init__(self, G, d=3):

g = [lambda x: regular(x * (2./G.lmax), d)]
g.append(lambda x: np.real(np.sqrt(1 - (regular(x * (2./G.lmax), d))
Expand All @@ -65,4 +65,4 @@ def regular(val, d):

return np.sin(np.pi / 4.*(1 + output))

super(Regular, self).__init__(G, g, **kwargs)
super(Regular, self).__init__(G, g)
4 changes: 2 additions & 2 deletions pygsp/filters/simoncelli.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Simoncelli(Filter):
"""

def __init__(self, G, a=2./3, **kwargs):
def __init__(self, G, a=2./3):

g = [lambda x: simoncelli(x * (2./G.lmax), a)]
g.append(lambda x: np.real(np.sqrt(1 -
Expand All @@ -63,4 +63,4 @@ def simoncelli(val, a):

return y

super(Simoncelli, self).__init__(G, g, **kwargs)
super(Simoncelli, self).__init__(G, g)
4 changes: 2 additions & 2 deletions pygsp/filters/simpletight.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class SimpleTight(Filter):
"""

def __init__(self, G, Nf=6, scales=None, **kwargs):
def __init__(self, G, Nf=6, scales=None):

def kernel(x, kerneltype):
r"""
Expand Down Expand Up @@ -98,4 +98,4 @@ def h(x):
for i in range(Nf - 1):
g.append(lambda x, i=i: kernel(scales[i] * x, 'wavelet'))

super(SimpleTight, self).__init__(G, g, **kwargs)
super(SimpleTight, self).__init__(G, g)

0 comments on commit 1d9c1ca

Please sign in to comment.