Skip to content

ENH: Implement nan_to_num function #398

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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

paddyroddy
Copy link

Fixes #304. This is still in progress but want to see what would happen in CI.

nan_to_num is a weird function that has unexpected behaviour IMO (e.g. infinities are converted too) but feel, for now, we should keep it as downstream behaviours would expect.

paddyroddy and others added 2 commits August 22, 2025 16:35
Co-authored-by: Lucas Colley <lucas.colley8@gmail.com>
Co-authored-by: Lucas Colley <lucas.colley8@gmail.com>
@lucascolley lucascolley added this to the 0.8.1 milestone Aug 22, 2025
@lucascolley lucascolley added enhancement New feature or request new function labels Aug 22, 2025
@lucascolley lucascolley changed the title Implement nan_to_num function ENH: Implement nan_to_num function Aug 22, 2025
@paddyroddy
Copy link
Author

paddyroddy commented Aug 22, 2025

Have addressed your comments.

  • Let me know when you've tested in sklearn

@lucascolley
Copy link
Member

ran this through sklearn and nothing immediately complained! Once we have some more tests here, lets merge it and make a release, then try to integrate it into scikit-learn 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new function
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: add nan_to_num
2 participants