warp.sign#

warp.sign(x: Scalar) → Scalar#
  • Kernel

  • Python

Compute the sign of x.

Returns:

-1 if x < 0 and 1 otherwise.

warp.sign(x: Vector[Scalar, Any]) → Vector[Scalar, Any]
  • Kernel

  • Python

Compute the sign of x.

Returns:

-1 for negative elements of x and 1 otherwise.