Skip to contents

Divides two tensors element-wise.

Usage

nvl_div(lhs, rhs)

Arguments

lhs, rhs

(tensorish)
Tensorish values of data type integer, unsigned integer, or floating-point. Must have the same shape.

Value

tensorish
Has the same shape and data type as the inputs. It is ambiguous if both inputs are ambiguous.

StableHLO

Lowers to stablehlo::hlo_divide().

See also

Examples

jit_eval({
  x <- nv_tensor(c(10, 20, 30))
  y <- nv_tensor(c(2, 5, 10))
  nvl_div(x, y)
})
#> AnvilTensor
#>  5
#>  4
#>  3
#> [ CPUf32{3} ]