warp.sign#

warp.sign(x: Scalar) Scalar#
  • Kernel: true
  • Python: true
  • Differentiable: false

Compute the sign of x.

Returns:

-1 if x < 0 and 1 otherwise.

warp.sign(x: Vector[Scalar, Any]) Vector[Scalar, Any]
  • Kernel: true
  • Python: true
  • Differentiable: false

Compute the sign of x.

Returns:

-1 for negative elements of x and 1 otherwise.