x0 = numpy.array([0.0, 0.0])
sigma = numpy.array([1.0, 1.0, 1.0, 1.0, 1.0, 1.0])

def func(d1, Bo):
    return d1 * Bo
print(optimization.curve_fit(func, xdata, ydata, x0, sigma))
Find best fit parameters using Python