jax.scipy.special.polygamma

jax.scipy.special.polygamma(n, x)[source]

Polygamma functions.

LAX-backend implementation of polygamma(). Original docstring below.

Defined as \(\psi^{(n)}(x)\) where \(\psi\) is the digamma function. See [dlmf] for details.

narray_like

The order of the derivative of the digamma function; must be integral

xarray_like

Real valued input

ndarray

Function results

digamma

dlmf

NIST, Digital Library of Mathematical Functions, https://dlmf.nist.gov/5.15

>>> from scipy import special
>>> x = [2, 3, 25.5]
>>> special.polygamma(1, x)
array([ 0.64493407,  0.39493407,  0.03999467])
>>> special.polygamma(0, x) == special.psi(x)
array([ True,  True,  True], dtype=bool)