Skip to content

Raise correct ValueError on seeing confusion matrix#903

Merged
pavoljuhas merged 2 commits intoquantumlib:mainfrom
pavoljuhas:fix-confusion-matrix-check
Oct 14, 2025
Merged

Raise correct ValueError on seeing confusion matrix#903
pavoljuhas merged 2 commits intoquantumlib:mainfrom
pavoljuhas:fix-confusion-matrix-check

Conversation

@pavoljuhas
Copy link
Copy Markdown
Collaborator

The code for checking confusion matrices had a bug (conversion of
numpy array to bool, e.g., bool(np.eye(2))) which raised
ValueError instead of the ValueError we intended to raise.

Make test check exception message and fix the exposed bug too.

Follow-up to #630

The code for checking confusion matrices had a bug (conversion of
numpy array to bool, e.g., `bool(np.eye(2))`) which raised
ValueError instead of the ValueError we intended to raise.

Make test check exception message and fix the exposed bug too.

Follow-up to quantumlib#630
@github-actions github-actions Bot added the size: S 10< lines changed <50 label Oct 13, 2025
@pavoljuhas pavoljuhas changed the title Raise correct ValueError on seeing confusion matrices Raise correct ValueError on seeing confusion matrix Oct 13, 2025
List was already built from a truth-checked values.
@pavoljuhas pavoljuhas requested a review from mhucka October 13, 2025 22:00
Copy link
Copy Markdown
Collaborator

@mhucka mhucka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pavoljuhas pavoljuhas added this pull request to the merge queue Oct 13, 2025
Merged via the queue into quantumlib:main with commit f992060 Oct 14, 2025
57 checks passed
@pavoljuhas pavoljuhas deleted the fix-confusion-matrix-check branch October 14, 2025 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: S 10< lines changed <50

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants