Skip to content

LMFit tolerance routed by raw method argument instead of configured enum method #270

@rozyczko

Description

@rozyczko

Finding F-H5 in DEEP_ANALYSIS.md (parent #261). Verified empirically.

minimizer_lmfit.py:162, 246-249_get_fit_kws(method, ...) receives the raw method argument, which is None on the normal enum-configured path, so tolerance is always mapped to ftol:

  • LMFit_cobyla + fitter.tolerance -> TypeError: minimize() got an unexpected keyword argument 'ftol', wrapped in FitError.
  • For powell / differential_evolution the intended 'tol' branch is unreachable; the user's tolerance is silently dropped or misapplied.

Fix: key the mapping off self._method (the resolved method), not the raw argument.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [area] fittingUmbrella for fitting related work[priority] highShould be prioritized soon[scope] bugBug report or fix (major.minor.PATCH)
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions