Skip to contents

Element-wise natural logarithm.

Usage

prim_log(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

  • quickr

  • reverse

StableHLO

Lowers to stablehlo::hlo_log().

See also

Examples

x <- nv_array(c(1, 2.718, 7.389))
prim_log(x)
#> AnvlArray
#>  0.0000
#>  0.9999
#>  2.0000
#> [ CPUf32{3} ]