Commits

Olivier Debeir committed 575f359

explicit function paramaters in decorator

Comments (0)

Files changed (1)

pyrankfilter/filter.py

 from helpers import auto_indent_c
 
 def rank_decorator(method):
-    def local_fun(*arguments, **namedArguments):
-        new_arg = [list(arguments)[0]]
-        new_arg.append(method.__name__)
-        new_arg.extend(list(arguments)[1:])
-        return rankfilter(*new_arg,**namedArguments)
+    def local_fun(ima,radius,infSup = (.1,.9), mask = None,bitDepth = 8,verbose = False,
+                  spectral_interval = (5,5),force = False, float_output = False):
+
+        return rankfilter(ima,method.__name__,radius=radius,infSup=infSup, mask=mask,bitDepth=bitDepth,verbose=verbose,
+            spectral_interval=spectral_interval,force=force,float_output=float_output)
 
     doc = inspect.cleandoc(method.__doc__)
     kernel = ''.join(['    %s\n'%s for s in auto_indent_c(C_kernel[method.__name__]).split()])