Skip to content

MNT helper _nan_to_num function for array API #30637

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

StefanieSenger
Copy link
Contributor

@StefanieSenger StefanieSenger commented Jan 13, 2025

Reference Issues/PRs

Towards #26024

What does this implement/fix? Explain your changes.

Adding a function that might be useful for implementing Array API in silhouette_samples (and in BaseSearchCV._format_results._store() if we want that), where np.nan_to_num is used. I did not further check on these two.

(It was a by-product of #30440 and #30562, but due to selecting a different approach, not needed there anymore.)

Any other comments?

It is unclear if this function will be needed in the future (depending on how this will be decided in the corresponding array api issue and also depending on if we want to make silhouette_samples fully using all kinds of array or only make it compatible by only accepting all kind of array inputs). I don't mind if we don't do anything with this PR until it becomes clearer from the array api side how to handle this in the future.

Copy link

✔️ Linting Passed

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

Generated for commit: a67d366. Link to the linter CI: here

@StefanieSenger
Copy link
Contributor Author

StefanieSenger commented Jan 30, 2025

This is almost as findable if it is a closed PR compared to being an open PR, so let's close it to not clutter ourselves with half baked stuff.

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.

1 participant