params,cov,info,mesg,ier = leastsq(
func=self.residual, x0=active_params, full_output=True,
diag=scale, **kwargs)
+ if len(initial_params) == 1:
+ params = [params]
if self._rescale == True:
active_params = params
- if len(initial_params) == 1: # params is a float
- params = params * self._param_scale_factors[0]
- else:
- params = [p*s for p,s in zip(params,
- self._param_scale_factors)]
+ params = [p*s for p,s in zip(params, self._param_scale_factors)]
else:
active_params = params
self.fit_info = {