Warning
This page was created from a pull request.
jax.scipy.special.zetaΒΆ
-
jax.scipy.special.
zeta
(x, q=None)[source]ΒΆ Riemann or Hurwitz zeta function.
LAX-backend implementation of
zeta()
. Original docstring below.- Parameters
x (array_like of float) β Input data, must be real
q (array_like of float, optional) β Input data, must be real. Defaults to Riemann zeta.
- Returns
out β Values of zeta(x).
- Return type
array_like
Notes
The two-argument version is the Hurwitz zeta function
\[\zeta(x, q) = \sum_{k=0}^{\infty} \frac{1}{(k + q)^x};\]see [dlmf] for details. The Riemann zeta function corresponds to the case when
q = 1
.See also
zetac()
References
- dlmf
NIST, Digital Library of Mathematical Functions, https://dlmf.nist.gov/25.11#i
Examples
>>> from scipy.special import zeta, polygamma, factorial
Some specific values:
>>> zeta(2), np.pi**2/6 (1.6449340668482266, 1.6449340668482264)
>>> zeta(4), np.pi**4/90 (1.0823232337111381, 1.082323233711138)
Relation to the polygamma function:
>>> m = 3 >>> x = 1.25 >>> polygamma(m, x) array(2.782144009188397) >>> (-1)**(m+1) * factorial(m) * zeta(m+1, x) 2.7821440091883969