-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
ENH: special: change zeta signature to zeta(x, q=1) #6094
Conversation
@@ master #6094 diff @@
======================================
Files 238 238
Stmts 43865 43869 +4
Branches 8218 8219 +1
Methods 0 0
======================================
+ Hit 34296 34298 +2
- Partial 2602 2603 +1
- Missed 6967 6968 +1
|
I've wondered whether it was worth introducing a new function called maybe
Of course all this is moot without implementations of Riemann/Hurwitz zeta for complex arguments, which I'm still working on... |
The continuous alternative would be to have something like |
Updated --- maybe this is a better way to do the riemann/hurwitz switch |
This seems like a nice solution to me. Perhaps worth adding a note in the documentation that Riemann zeta is Hurwitz zeta with Also, strictly speaking the domain in the documentation is incorrect; things like |
This makes zeta(x) be the Riemann zeta function if the second argument is not given, and the Hurwitz zeta if two arguments are given. The change is backward-compatible.
Maybe even mention this in the release notes. Regardless, +1 and LGTM. |
@pv So what's the rationale for |
See the discussion above. |
@pv I did, but I don't see a reason for why it should default to |
Because we want to leave room to use different algorithms for hurwitz and plain zeta. |
Support complex values and using different algorithms is great, but what does that have to do with the |
Ohh, in case the algorithms produce slightly different results, you don't want a discontinuity when sweeping across |
Yes, that's the reasoning. Since Riemann zeta is so well-studied there are superior algorithms. Two different functions makes sense, but backwards compatibility. |
Make the second argument of zeta(x,q) default to q=1. This makes the one-argument zeta(x) be the Riemann zeta function if the second argument is not given.
Previously, you had to write zeta(x,1) which is somewhat annoying since the Riemann zeta function is more often needed than the Hurwitz one.