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

Skip to content

Make common test_check_targets_array_api - #34487

Merged
OmarManzoor merged 2 commits into
scikit-learn:mainfrom
lucyleeow:check_targets
Jul 16, 2026
Merged

Make common test_check_targets_array_api#34487
OmarManzoor merged 2 commits into
scikit-learn:mainfrom
lucyleeow:check_targets

Conversation

@lucyleeow

@lucyleeow lucyleeow commented Jul 16, 2026

Copy link
Copy Markdown
Member

Reference Issues/PRs

As discussed in #33778 (comment)

What does this implement/fix? Explain your changes.

Make test__check_reg_targets_array_api a common test for both _check_targets and check_reg_targets and move to test_common.py.

Fix _check_targets such that y_pred is also moved if xp and device is passed (and not the same xp and device as y_pred). Note that this is a corner case, and never occurs in our code, so no changelog needed.

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?

@lucyleeow

Copy link
Copy Markdown
Member Author

cc @OmarManzoor

@OmarManzoor OmarManzoor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Thank you @lucyleeow

@OmarManzoor
OmarManzoor merged commit 8816591 into scikit-learn:main Jul 16, 2026
53 of 54 checks passed
@lucyleeow
lucyleeow deleted the check_targets branch July 16, 2026 08:54
prady0t pushed a commit to prady0t/scikit-learn that referenced this pull request Sep 2, 2026
@jeremiedbb jeremiedbb mentioned this pull request Sep 8, 2026
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants