scipy.special.polygamma

scipy.special.polygamma(n, x)[源代码]

多重伽马函数。

定义为 \(\psi^{{(n)}}(x)\) 哪里 \(\psi\) 是不是 digamma 功能。看见 [dlmf] 有关详细信息,请参阅。

参数
narray_like

Digamma函数的导数的阶数;必须是整数

xarray_like

实值输入

退货
ndarray

函数结果

参见

digamma

参考文献

dlmf

数学函数数字类库,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)