warp.sign#

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

Compute the sign of x.

Returns:

-1 if x < 0 and 1 otherwise.

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

  • Differentiable

Compute the sign of x.

Returns:

-1 for negative elements of x and 1 otherwise.