Skip to contents

Element-wise natural logarithm. You can also use log().

Usage

nv_log(operand)

Arguments

operand

(tensorish)
Operand.

Value

tensorish
Has the same shape and data type as the input.

See also

nvl_log() for the underlying primitive.

Examples

jit_eval({
  x <- nv_tensor(c(1, 2.718, 7.389))
  log(x)
})
#> AnvilTensor
#>  0.0000
#>  0.9999
#>  2.0000
#> [ CPUf32{3} ]