I\'m trying to fit a Gaussian for my data (which is already a rough gaussian). I\'ve already taken the advice of those here and tried curve_fit and leasts
curve_fit
leasts
sigma = sum(y*(x - mean)**2)
should be
sigma = np.sqrt(sum(y*(x - mean)**2))