Non-Linear Least Squares Minimization, with flexible Parameter settings, based on scipy.optimize, and with many additional classes and methods for curve fitting.
Version 1.0.2 officially supports Python 3.9 and has dropped support for Python 3.5. The minimum version of the following dependencies were updated: asteval>=0.9.21, numpy>=1.18, and scipy>=1.3.
New features:
lmfit.models.lmfit_models
; new Model class attribute valid_forms
(PR #663; @rayosborn)run_mcmc_kwargs argument
to Minimizer.emcee
to pass to the emcee.EnsembleSampler.run_mcmc
function (PR #694; @rbnvrw)Bug fixes:
ModelResult.eval_uncertainty
should use provided Parameters (PR #646)not_zero
to prevent ZeroDivisionError in lineshapes and use in exponential lineshape (Issue #631, PR #664; @s-weigand)last_internal_values
and use to restore internal values if fit is aborted (PR #667)lbfgsb
method now works, convert bytes to string if needed (Issue #677, PR #678; @leonfoks)init_params
and init_fit
are set when loading a ModelResult
(PR #706)Various:
test_check_ast_errors
for Python 3.9 (Issue #674, PR #675; @mwhudson)tiny
and check for it in bounded parameters to avoid "parameter not moving from initial value" (Issue #700, PR #701)max_nfev
to basinhopping
and brute
(now supported everywhere in lmfit) and set to more uniform default values (PR #701)Version 1.0.1 is the last release that supports Python 3.5. All newer version will require 3.6+ so that we can use formatting-strings and rely on dictionaries being ordered.
New features:
max_nfev
to uniformly specify the maximum number of function evalutions (PR #610)
Please note: all other arguments (e.g., maxfev
, maxiter
, ...) will no longer be passed to the underlying
solver. A warning will be emitted stating that one should use max_nfev
.
call_kws
was added to the MinimizerResult
class and contains the keyword arguments that are
supplied to the solver in SciPy.Bug fixes:
load
and __setstate__
methods of the Parameter classguess_from_peak
function now also works correctly with decreasing x-values or when using
pandas (PRs #627 and #629; @mpmdean)Parameter.set()
method now correctly first updates the boundaries and then the value (Issue #636, PR #637; @arunpersaud)Various:
isParameter
function and automatic conversion of an uncertainties
object (PR #626)Version 1.0.0 supports Python 3.5, 3.6, 3.7, and 3.8
New features:
Improvements:
six
package are removed. (PR #612)Various:
emcee
. (PR #614)Version 0.9.15 is the last release that supports Python 2.7; it now also fully suports Python 3.8.
New features, improvements, and bug fixes:
Various:
To-be deprecated:
Version 0.9.15 is the last release that supports Python 2.7; it now also fully supports Python 3.8.
New features, improvements, and bug fixes:
Various:
To-be deprecated:
New features:
shgo
and dual_annealing
(new in SciPy v1.2) are now supported (Issue #527; PRs #545 and #556)eval
method added to the Parameter class (PR #550 by @zobristnicholas)printfuncs.params_html_table
(PR #552 by @aaristov and PR #559)brute
method (PR #564, requires SciPy v1.3)Bug fixes:
value
to both min
and max
(PR #571)FWHM
and height
expression calculations (PR #545)result.method
for emcee
algorithm (PR #558)inspect.signature
for PY3 to support wrapped functions (Issue #570; PR #576)result.nfev``` for
brute`` method when using parallelization (Issue #578; PR #579)Various:
jupyter-sphinx
to include examples/output (PRs #573 and #575)sphinx-gallery
(PR #574 and #583)