Performs logical OR along the specified axes.
Value
(arrayish)
Has the boolean data type. The shape is the input's with the reduced axes
removed (drop = TRUE) or set to 1 (drop = FALSE).
StableHLO
Lowers to hlo_reduce(), specified under
reduce.
The reducer is hlo_or().
Examples
x <- nv_matrix(c(TRUE, FALSE, TRUE, TRUE), nrow = 2)
# TRUE where any element is TRUE along axis 1
prim_reduce_any(x, axes = 1L)
#> AnvlArray
#> 1
#> 1
#> [ CPUbool{2} ]
# drop = FALSE keeps the reduced axis at size 1 instead
prim_reduce_any(x, axes = 1L, drop = FALSE)
#> AnvlArray
#> 1 1
#> [ CPUbool{1,2} ]