Skip to contents

Element-wise digamma function (logarithmic derivative of the gamma function).

Usage

prim_digamma(operand)

Arguments

operand

(arrayish)
Arrayish value of data type floating-point.

Value

arrayish
Has the same shape and data type as the input. It is ambiguous if the input is ambiguous.

Implemented Rules

  • stablehlo

  • reverse

StableHLO

Lowers to stablehlo::hlo_digamma().

Examples

x <- nv_array(c(0.5, 1, 2, 5))
prim_digamma(x)
#> AnvlArray
#>  -1.9635
#>  -0.5772
#>   0.4228
#>   1.5061
#> [ CPUf32{4} ]