CopysignΒΆ

Create a new floating-point tensor with the magnitude of input and the sign of other.

Abstract Signature:

Copysign(input: Tensor, other: Tensor)

PyTorch

API: torch.copysign
Strategy: Direct Mapping

JAX (Core)

API: jax.numpy.copysign
Strategy: Direct Mapping

NumPy

API: numpy.copysign
Strategy: Direct Mapping

Keras

API: keras.ops.multiply
Strategy: Macro 'keras.ops.multiply(keras.ops.abs({input}), keras.ops.sign({other}))'

TensorFlow

API: tf.math.multiply
Strategy: Macro 'tf.math.multiply(tf.math.abs({input}), tf.math.sign({other}))'

Apple MLX

API: mlx.core.multiply
Strategy: Macro 'mlx.core.abs({input}) * mlx.core.sign({other})'

Flax NNX

API: jax.numpy.copysign
Strategy: Direct Mapping

PaxML / Praxis

API: jax.numpy.copysign
Strategy: Direct Mapping