R/api.R
nv_abs.Rd
Element-wise absolute value. You can also use abs().
abs()
nv_abs(operand)
(tensorish) Operand.
tensorish
tensorish Has the same shape and data type as the input.
nvl_abs() for the underlying primitive.
nvl_abs()
jit_eval({ x <- nv_tensor(c(-1, 2, -3)) abs(x) }) #> AnvilTensor #> 1 #> 2 #> 3 #> [ CPUf32{3} ]