* Added extra debugging statements.

master
Wirawan Purwanto 10 years ago
parent 1e56bb95eb
commit 04e78ade1d
  1. 4
      math/fitting/__init__.py

@ -266,12 +266,16 @@ def fit_func(Funct, Data=None, Guess=None, Params=None,
if use_lmfit:
if Params == None:
if debug >= 10:
print "No input Params given; creating unconstrained params"
# Creates a default list of Parameters for use later
assert Guess != False
Params = Parameters()
for (g,pn) in zip(Guess, param_names):
Params.add(pn, value=g)
else:
if debug >= 10:
print "Input Params specified; use them"
if Guess == None or Guess == False:
# copy the Params' values to Guess
Guess = [ Params[pn].value for pn in param_names ]

Loading…
Cancel
Save