* Added extra debugging statements.

master
Wirawan Purwanto 11 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 use_lmfit:
if Params == None: if Params == None:
if debug >= 10:
print "No input Params given; creating unconstrained params"
# Creates a default list of Parameters for use later # Creates a default list of Parameters for use later
assert Guess != False assert Guess != False
Params = Parameters() Params = Parameters()
for (g,pn) in zip(Guess, param_names): for (g,pn) in zip(Guess, param_names):
Params.add(pn, value=g) Params.add(pn, value=g)
else: else:
if debug >= 10:
print "Input Params specified; use them"
if Guess == None or Guess == False: if Guess == None or Guess == False:
# copy the Params' values to Guess # copy the Params' values to Guess
Guess = [ Params[pn].value for pn in param_names ] Guess = [ Params[pn].value for pn in param_names ]

Loading…
Cancel
Save