Open afeldmei opened 6 years ago
I ran fit_example.py on another computer with python 2.7.8 and got an error at the same location:
Traceback (most recent call last): File "fit_example.py", line 260, in
results_theta.add('{}'.format(v), value=r, vary=False) AttributeError: 'Parameter' object has no attribute 'add'
Any idea how to solve it?
I think your first error was a silly mistake on my part- you can just replace
results_theta=LM.Parameters()
for v, r in zip(variables, best_results):
print(v, r)
results_theta.add('{}'.format(v), value=r, vary=False)
with
results_theta=LM.Parameters()
for v, r in zip(variables, best_results):
print(v, r)
results_theta.add('{}'.format(v), value=r[0], vary=False)
i.e. only select the first element of the row of best_results. Your second comment I'm not too sure about and can't reproduce- but if you could try again with the updated code (commit c84ff5a11a5421ecd2ef0137826481f702562f94) and see how you get on?
I run fit_example.py and get an error message. After running emcee, when the code makes a set of parameters with the results, I get the following error:
I use lmfit 0.9.11, numpy 1.11.3, and python 2.7.15