Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[BEHAVIOR] Dangerous behaviour when building constraints #666

@acampove

Description

@acampove

Describe what happens

When building constraints we do something like:

        cns   = zfit.constraint.GaussianConstraint(
            params         = l_par, 
            observation = l_obs_par,
            cov                 = cov)

where the stuff starting with l_ is meant to be a list. This should allow for an n-dimensional Gaussian cosntraint where each element of l_par gets constrained by the corresponding element in l_obs_par and the pairing goes to the cov matrix. All this assuming that the ordering is the same.

However I mistakenly used a set for the l_par. This means that, given that sets are not ordered, the constraints get swapped between components.

In a place like this convert_to_container could raise an exception if an unnordered container is passed by mistake.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionFor discussions on concepts and ideas

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions