def fun_fit(P, x, y, ydata, a, do_var=0): if do_var is not 0: do_var = ptr(do_var) getattr(ff, name_fit)(P.size, ptr(P), x.size, ptr(x), ptr(y), ptr(ydata), ptr(a), do_var) return P
def fun_diff(P, x, y, ydata, a): getattr(ff, name_diff)(P.size, ptr(P), x.size, ptr(x), ptr(y), ptr(ydata), ptr(a)) return y
def fun_rms(P, x, y, a): return getattr(ff, name_rms)(P.size, ptr(P), x.size, ptr(x), ptr(y), ptr(a))
def fun(P, x, y, a): getattr(ff, name)(P.size, ptr(P), x.size, ptr(x), ptr(y), ptr(a)) return y