The cost function returned to the user in the FitResult function is different to the one shown in the verbose output of the fit function. This verbose output comes direct from scipy.least_squares. This should be clearly documented as it is a source of confusion.

The cost function returned to the user in the
FitResultfunction is different to the one shown in the verbose output of thefitfunction. This verbose output comes direct fromscipy.least_squares. This should be clearly documented as it is a source of confusion.