The curve_fit help uses N for the number of data points and M for the number of parameters, but then calls leastsq which has these reversed. This makes some of the error messages harder to understand.
I suggest simply swapping N and M in the curve_fit help.
Would make sense that these two functions have consistent docs. Changing the curve_fit docstring should be straightforward.
DOC: make curve_fit nomenclature same as leastsq
The curve_fit help used N for the number of data points and M for the number of parameters, but lasts which has these reversed. Fixes issue #3172