torch_signbit function

Signbit

Signbit

torch_signbit(self)

Arguments

  • self: (Tensor) the input tensor.

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) }
  • Maintainer: Daniel Falbel
  • License: MIT + file LICENSE
  • Last published: 2025-02-14

Downloads (last 30 days):