Signbit
Source:R/gen-namespace-docs.R
, R/gen-namespace-examples.R
, R/gen-namespace.R
torch_signbit.Rd
Signbit
signbit(input, *, out=None) -> Tensor
Tests if each element of input
has its sign bit set (is less than zero) or not.
Examples
if (torch_is_installed()) {
a <- torch_tensor(c(0.7, -1.2, 0., 2.3))
torch_signbit(a)
}
#> torch_tensor
#> 0
#> 1
#> 0
#> 0
#> [ CPUBoolType{4} ]