question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No complex arguments in scipy.special.zeta or scipy.special.zetac

See original GitHub issue

This 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:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
person142commented, Aug 28, 2018

@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.

0reactions
rgommerscommented, Aug 31, 2018

Okay looks like that’s a no to the feature request for the time being. So closing.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found