Skip to content

LMFit.convert_to_pars_obj crashes: Parameters.add_many takes varargs, not a list #269

Open

Description

@rozyczko

Finding F-H3 in DEEP_ANALYSIS.md (parent #261). Verified against installed lmfit.

minimizer_lmfit.py:271-274:

lm_parameters = LMParameters().add_many([
    self.convert_to_par_object(parameter) for parameter in parameters
])

add_many(*parlist) takes varargs; passing one list makes lmfit do Parameter(*[LMParameter, ...]) -> TypeError: unhashable type: 'Parameter'. Even with * unpacking, add_many returns None, so the return value is wrong either way. Fitter.convert_to_pars_obj is therefore broken for the default minimizer family; the unit test passes only because it mocks the minimizer.

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