delicatessen.utilities.polygamma

polygamma(n, x)

Polygamma function. This is a wrapper function of scipy.special.polygamma meant to enable automatic differentation with delicatessen. When the input is a PrimalTangentPairs object, then an internal function that implements the polygamma function is called. Otherwise, scipy.special.polygamma is called for the input object.

Parameters
  • n (int) – Order of the derivative of the digamma function

  • x (int, float, ndarray) – Real valued input

Returns

  • Return type depends on the input type (PrimalTangentPairs will return PrimalTangentPairs, otherwise will

  • return ndarray).