Element-wise polygamma function: the (n+1)-th derivative of the
log-gamma function. For n = 0 this is the digamma function; for n = 1,
trigamma() dispatches here.
Arguments
- n, x
(
arrayish)
Order of the polygamma function and the value to evaluate it at.ntypically holds non-negative whole numbers. Can be any numeric data type: the two are promoted to a common data type and that is then converted to the default float data type (seedefault_dtypes()) where it is not a float already, since a float is allprim_polygamma()takes. An R value assumes the other operand's data type within its data type category, and settles on the default float when neither has one. Scalars are broadcast to the shape of the other, sonv_polygamma(1, x)works for any floatx.
Value
(arrayish)
Has the inputs' broadcast shape, and their common data type – or the
default float data type (see default_dtypes()) where that was an
integer one.
The trigamma() generic
trigamma(x) is nv_polygamma(1L, x).
See also
prim_polygamma() for the underlying primitive.