Make support_sz part of interp_method
shaibagon opened this issue · comments
Shai commented
If I understand correctly, support_sz
is determined by interp_method
.
In that case, why not make support_sz
a function attribute, for example:
@support_sz(4)
def cubic(x):
fw, to_dtype, eps = set_framework_dependencies(x)
...
And in the code, you will only need to pass interp_method
and get the support size from interp_method.support_sz
?
implementing the decorator:
def support_sz(sz):
def wrapper(f):
f.support_sz = sz
return f
return wrapper
Assaf Shocher commented
Thanks Shai, that's a great advice! fixed.