Skip to contents

Element-wise logical AND. You can also use the & operator.

Usage

nv_and(lhs, rhs)

Arguments

lhs, rhs

(arrayish)
Left and right operand. Operands are promoted to a common data type. Scalars are broadcast to the shape of the other operand.

Value

arrayish
Has the same shape and the promoted common data type of the inputs.

See also

prim_and() for the underlying primitive.

Examples

x <- nv_array(c(TRUE, FALSE, TRUE))
y <- nv_array(c(TRUE, TRUE, FALSE))
x & y
#> AnvlArray
#>  1
#>  0
#>  0
#> [ CPUbool{3} ]