xdata = numpy.array([0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5])
ydata = numpy.array([25.0, 40.0, 22.0, 12.0, 8.0, 3.0, 1.0, 1.0, 0.0, 0.0])
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