SgnΒΆ

Computes the sign of the input tensor, supporting complex numbers.

Abstract Signature:

Sgn(input: Tensor)

PyTorch

API: torch.sgn
Strategy: Direct Mapping

JAX (Core)

API: jax.numpy.sign
Strategy: Direct Mapping

NumPy

API: numpy.sign
Strategy: Direct Mapping

Keras

API: keras.ops.sign
Strategy: Direct Mapping

TensorFlow

API: tf.math.sign
Strategy: Direct Mapping

Apple MLX

API: mlx.core.sign
Strategy: Direct Mapping

Flax NNX

API: jax.numpy.sign
Strategy: Direct Mapping

PaxML / Praxis

API: jax.numpy.sign
Strategy: Direct Mapping