Skip to contents

Divides two arrays element-wise.

Usage

prim_div(lhs, rhs)

Arguments

lhs, rhs

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

Value

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

Implemented Rules

  • stablehlo

  • quickr

  • reverse

StableHLO

Lowers to stablehlo::hlo_divide().

See also

Examples

x <- nv_array(c(10, 20, 30))
y <- nv_array(c(2, 5, 10))
prim_div(x, y)
#> AnvlArray
#>  5
#>  4
#>  3
#> [ CPUf32{3} ]