Skip to content

Might be a bug in to_permutation_matrix? #2

@charliecheng

Description

@charliecheng

Hi,
Currently I'm using you birkhoff module, it works fine in most cases, great work!

However, in the to_permutation_matrix(matches) functions, the length of matches might be different from the input matrix S(D) 's degree (m,n) (Somehow? I'm not sure about the algorithm itself.In the test, sometimes it works fine but sometimes failed), leading to a index_out_of_range exception, since you are using len(matches) as the length of returned matrix P.

After I create the right length of P in to_permutation_matrix(), it works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions