mindspore.ops.polygamma

View Source On Gitee
mindspore.ops.polygamma(n, input)[source]

Computes the n-th derivative of the polygamma function on input.

ψ(a)(x)=d(a)dx(a)ψ(x)

where ψ(x) is the digamma function.

Parameters
  • n (Tensor) – The order of the polygamma function.

  • input (Tensor) – The input tensor.

Returns

Tensor

Supported Platforms:

GPU CPU

Examples

>>> import mindspore
>>> x = mindspore.tensor([3.14, -2.71], mindspore.float64)
>>> a = mindspore.tensor(1, mindspore.int64)
>>> output = mindspore.ops.polygamma(a, x)
>>> print(output)
[ 0.37446456 15.49884838]