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

Skip to content

Conversation

@lucyleeow
Copy link
Member

Reference Issues/PRs

Towards #26024

What does this implement/fix? Explain your changes.

Add array API support to precision_recall_curve

Any other comments?

@github-actions
Copy link

github-actions bot commented Sep 22, 2025

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 145ba36. Link to the linter CI: here

@lucyleeow
Copy link
Member Author

lucyleeow commented Sep 27, 2025

Tests fail on torch because it does not support negative indexing (data-apis/array-api-compat#144, pytorch/pytorch#59786) - it seems we could use flip but that creates a copy...?

Seems unlikely to change?

And from previous interactions with pytorch devs, my impression was that the assumption that slice steps are non-negative is baked too deep into the torch core to really hope it'll get fixed in torch itself.

Not sure if there is a standard workaround for this? Or do we need to re-write to avoid negative indexing? Or skip for torch...?

Edit: scipy uses flip, even though it creates a copy, but shouldn't be too bad in this case, and does not seem like there is anything else we can do so 🤷

@lucyleeow
Copy link
Member Author

cc @OmarManzoor @virchan @betatim in case someone is interested to review

Copy link
Contributor

@OmarManzoor OmarManzoor left a comment

Choose a reason for hiding this comment

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

Generally looks good. Thanks for the PR @lucyleeow

Copy link
Contributor

@OmarManzoor OmarManzoor left a comment

Choose a reason for hiding this comment

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

LGTM

@OmarManzoor OmarManzoor added the Waiting for Second Reviewer First reviewer is done, need a second one! label Oct 1, 2025
@lucyleeow
Copy link
Member Author

Thanks for the review @OmarManzoor !

Copy link
Member

@virchan virchan left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks, @lucyleeow!

@OmarManzoor, could we merge this?

@OmarManzoor OmarManzoor merged commit 5ebcc4b into scikit-learn:main Oct 7, 2025
44 checks passed
@lucyleeow lucyleeow deleted the aapi_pr_curve branch October 7, 2025 08:24
@lucyleeow
Copy link
Member Author

Thank you for the reviews!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Array API Waiting for Second Reviewer First reviewer is done, need a second one!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants