Skip to content

Commit 3d59be9

Browse files
committed
fix '_lnsigma' to '__lnsigma', 'scipy_diffev' to 'differential_evolution'
1 parent 7a4ad54 commit 3d59be9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lmfit/minimizer.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
# least_squares 0.17
4343

4444

45-
from scipy.optimize import differential_evolution as scipy_diffev
45+
from scipy.optimize import differential_evolution
4646

4747
# check for scipy.opitimize.least_squares
4848
HAS_LEAST_SQUARES = False
@@ -707,7 +707,7 @@ def scalar_minimize(self, method='Nelder-Mead', params=None, **kws):
707707
raise ValueError('differential_evolution requires finite '
708708
'bound for all varying parameters')
709709

710-
internal_bounds = [(-np.pi / 2., np.pi / 2.)] * len(vars)
710+
_bounds = [(-np.pi / 2., np.pi / 2.)] * len(vars)
711711
kwargs = dict(args=(), strategy='best1bin', maxiter=None,
712712
popsize=15, tol=0.01, mutation=(0.5, 1),
713713
recombination=0.7, seed=None, callback=None,
@@ -716,7 +716,7 @@ def scalar_minimize(self, method='Nelder-Mead', params=None, **kws):
716716
for k, v in fmin_kws.items():
717717
if k in kwargs:
718718
kwargs[k] = v
719-
ret = scipy_diffev(self.penalty, internal_bounds, **kwargs)
719+
ret = differential_evolution(self.penalty, _bounds, **kwargs)
720720
else:
721721
ret = scipy_minimize(self.penalty, vars, **fmin_kws)
722722

@@ -920,8 +920,8 @@ def emcee(self, params=None, steps=1000, nwalkers=100, burn=0, thin=1,
920920
`is_weighted is False` then the data uncertainty, `s_n`, will be
921921
treated as a nuisance parameter and will be marginalized out. This is
922922
achieved by employing a strictly positive uncertainty
923-
(homoscedasticity) for each data point, :math:`s_n = \exp(\_lnsigma)`.
924-
`_lnsigma` will be present in `MinimizerResult.params`, as well as
923+
(homoscedasticity) for each data point, :math:`s_n = \exp(\_\_lnsigma)`.
924+
`__lnsigma` will be present in `MinimizerResult.params`, as well as
925925
`Minimizer.chain`, `nvarys` will also be increased by one.
926926
927927
References

0 commit comments

Comments
 (0)