scipy.special.

polygamma#

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

Polygamma 函數。

定義為 \(\psi^{(n)}(x)\),其中 \(\psi\)digamma 函數。 詳情請參閱 [dlmf]

參數:
narray_like

digamma 函數導數的階數;必須為整數

xarray_like

實數值輸入

返回:
ndarray

函數結果

參見

digamma

參考文獻

[dlmf]

NIST,數學函數數位圖書館,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)