meam = sum(x * y)
sigma = sum(y * (x - m) ** 2)
popt, pcov = curve_fit(gauss_function, x, y, p0=[1, mean, sigma])
plot(x, gauss_function(x, *popt))
gaussian fit with scipy.optimize.curve_fit in python with wrong results