Skip to contents

Multiplies two arrays element-wise.

Usage

prim_mul(lhs, rhs)

Arguments

lhs, rhs

(arrayish)
Arrayish values of any data type. 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_multiply().

See also

Examples

x <- nv_array(c(1, 2, 3))
y <- nv_array(c(4, 5, 6))
prim_mul(x, y)
#> AnvlArray
#>   4
#>  10
#>  18
#> [ CPUf32{3} ]