No complex arguments in scipy.special.zeta or scipy.special.zetac
See original GitHub issueThis is a feature request. Complex numbers are not supported by the scipy.special.zeta and scipy.special.zetac functions.
Reproducing code example:
zeta(2+1j)
Error message:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-29-07480cb9365e> in <module>()
----> 1 zeta(2+1j)
/usr/local/lib/python3.6/dist-packages/scipy/special/basic.py in zeta(x, q, out)
2461 if q is None:
2462 q = 1
-> 2463 return _zeta(x, q, out)
2464
TypeError: ufunc '_zeta' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
Scipy/Numpy/Python version information:
0.19.1 1.14.5 sys.version_info(major=3, minor=6, micro=3, releaselevel='final', serial=0)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
scipy.special.zeta — SciPy v1.9.3 Manual
zetac. Notes. The two-argument version is the Hurwitz zeta function ... from scipy.special import zeta, polygamma, factorial. Some specific values:.
Read more >scipy.special.zeta(0) = NAN · Issue #10277 - GitHub
Hello, ζ(0) hangs NAN should be -0.5? import numpy as np from scipy.special import zeta print(scipy.
Read more >python - SciPy zeta function returns wildly large value
The old docstring for scipy.special.zeta said: y=zeta(x,q) returns the Riemann zeta function of two arguments: sum((k+q)**(-x),k=0..inf).
Read more >Special functions (scipy.special) — SciPy v0.8.dev Reference ...
Return the nth derivative of H2v(z) with respect to z. Spherical Bessel Functions¶. These are not universal functions: sph_jn(n, z) ...
Read more >Special functions (scipy.special) — SciPy v0.18.1 Reference ...
Bessel Functions¶. jv(v, z), Bessel function of the first kind of real order and complex argument.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@sohambhattacharyya an important question here is what application you have in mind when requesting complex arguments. The “standard” application for complex arguments of the Riemann zeta function is of course investigating the zeros along the critical strip, and this is not at all a procedure for which SciPy is suitable. Our special functions typically only accept double precision arguments, and properly investigating zeros requires using arbitrary precision. Arbitrary precision arguments are, at least for now, out of scope for SciPy.
Okay looks like that’s a no to the feature request for the time being. So closing.