Skip to content

MNT align type of multiclass_colors_ for list and colormap in DecisionBoundaryDisplay - #33651

Merged
ogrisel merged 5 commits into
scikit-learn:mainfrom
AnneBeyer:dbd_fix_multiclass_color_list
Mar 27, 2026
Merged

ogrisel merged 5 commits into
scikit-learn:mainfrom
AnneBeyer:dbd_fix_multiclass_color_list

Conversation

@AnneBeyer

Copy link
Copy Markdown
Member

Reference Issues/PRs

Noticed while playing around with #33612, also related to #33115

What does this implement/fix? Explain your changes.

When muticlass_colors is passed as a list, it was stored as list internally in multiclass_colors_ as well, whereas when passing a colormap reference, it was converted into a numpy array.
Now, all paths use the same type for storing internally, which makes the code more consistent and will also facilitate #33094.

AI usage disclosure

I used AI assistance for:

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Any other comments?

@AnneBeyer
AnneBeyer marked this pull request as draft March 27, 2026 15:07
@AnneBeyer

Copy link
Copy Markdown
Member Author

I'll also add a test for this.

@AnneBeyer
AnneBeyer marked this pull request as ready for review March 27, 2026 15:48
@AnneBeyer

Copy link
Copy Markdown
Member Author

@ogrisel, would you have time to take a look?

@ogrisel ogrisel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. The docker failures are unrelated.

@ogrisel
ogrisel enabled auto-merge (squash) March 27, 2026 16:45
@ogrisel
ogrisel merged commit dd53c1d into scikit-learn:main Mar 27, 2026
31 checks passed
@AnneBeyer
AnneBeyer deleted the dbd_fix_multiclass_color_list branch April 15, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants