Skip to content

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

Open

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.

Activity

  1. added
    [scope] bug
    [area] fitting
    [priority] high
    on Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [area] fitting[priority] high[scope] bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions