I am a beginner. I am trying to learn to use LMFit.
I have written a program which models the reproduction of cells.
As expected the output is an exponential growth curve.
Now, I need to learn to use LMFit before I start modifying the program to accommodate real situations.
My little program is modeled on the first example of the manual. Maybe, I should read more of the manual.
How should I proceed?
I get the following error message:
Current_Version/FindCurveParametersLMFitExpV_0_0_1.py')
File "/Users/sydney/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 786, in runfile
execfile(filename, namespace)
File "/Users/sydney/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "/Users/sydney/AnacondaProjects/capital_reproduction/Current_Version/FindCurveParametersLMFitExpV_0_0_1.py", line 77, in <module>
result = minner.minimize()
File "/Users/sydney/anaconda3/lib/python3.7/site-packages/lmfit/minimizer.py", line 1949, in minimize
return function(**kwargs)
File "/Users/sydney/anaconda3/lib/python3.7/site-packages/lmfit/minimizer.py", line 1492, in leastsq
lsout = scipy_leastsq(self.__residual, variables, **lskws)
File "/Users/sydney/anaconda3/lib/python3.7/site-packages/scipy/optimize/minpack.py", line 384, in leastsq
shape, dtype = _check_func('leastsq', 'func', func, x0, args, n)
File "/Users/sydney/anaconda3/lib/python3.7/site-packages/scipy/optimize/minpack.py", line 26, in _check_func
res = atleast_1d(thefunc(*((x0[:numinputs],) + args)))
File "/Users/sydney/anaconda3/lib/python3.7/site-packages/lmfit/minimizer.py", line 523, in __residual
out = self.userfcn(params, *self.userargs, **self.userkws)
File "/Users/sydney/AnacondaProjects/capital_reproduction/Current_Version/FindCurveParametersLMFitExpV_0_0_1.py", line 65, in fcn2min
model = (start * np.log(cycles * exp)) + constant
File "/Users/sydney/anaconda3/lib/python3.7/site-packages/lmfit/parameter.py", line 948, in __rmul__
return other * self._getval()
TypeError: can't multiply sequence by non-int of type 'numpy.float64'
Sydney