I am trying to use the curve_fit package to fit the following function:
def fitfunc(x,a1,b1,a2,b2): xc=1.0 y1 = (a1 + x*b1)[x<=xc] y2 = (