scipy.special.

polygamma#

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

多元伽玛函数。

定义为 \(\psi^{(n)}(x)\),其中 \(\psi\)digamma 函数。 有关详细信息,请参见 [dlmf]

参数:
narray_like

双伽玛函数的导数的阶数;必须是整数

xarray_like

实数值输入

返回:
ndarray

函数结果

参见

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)