8000 Fix for special.zeta nan handling - follow-up PR #138653 · Issue #146618 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

Fix for special.zeta nan handling - follow-up PR #138653 #146618

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

Open
vladimirrotariu opened this issue Feb 6, 2025 · 0 comments
Open

Fix for special.zeta nan handling - follow-up PR #138653 #146618

vladimirrotariu opened this issue Feb 6, 2025 · 0 comments
Labels
module: special Functions with no exact solutions, analogous to those in scipy.special triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@vladimirrotariu
Copy link
Contributor
vladimirrotariu commented Feb 6, 2025

🚀 The feature, motivation and pitch

Continuing PR #138653.

I hereby attach the suggestion of Albert Steppi (@steppi):

Now that we have this background out of the way. I think my preference in SciPy would be to change zeta(x, q) to be nan and to codify this as a recommendation in a special function array API extension as considered data-apis/array-api#725. I'm not sure what the downstream implications of this change might be though, and would be happy to hear feedback.

If there's no interest for PyTorch extending zeta to x < 1, then having zeta(1, q) return +inf makes sense, and by the principle guiding such special cases in the C99 standard, having zeta(1, nan) return +inf also makes sense in my opinion. However, through the work we are doing in SciPy discussed here, scipy/xsf#1, it would become straightforward for PyTorch to extend zeta if we extend it in SciPy, by using the xsf library as a shared dependency (although you would lose the ability to test against SciPy as an independent reference).

@rgommers @janeyx99 @mruberry

Alternatives

No response

Additional context

No response

cc @mruberry @kshitij12345

@mikaylagawarecki mikaylagawarecki added module: special Functions with no exact solutions, analogous to those in scipy.special triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: special Functions with no exact solutions, analogous to those in scipy.special triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

2 participants
0