TruncΒΆ

Returns a new tensor with the truncated integer values of the elements of input.

Abstract Signature:

Trunc(input: Tensor)

PyTorch

API: torch.trunc
Strategy: Direct Mapping

JAX (Core)

API: jnp.trunc
Strategy: Direct Mapping

NumPy

API: np.trunc
Strategy: Direct Mapping

Keras

API: keras.ops.trunc
Strategy: Direct Mapping

TensorFlow

API: tf.math.trunc
Strategy: Direct Mapping

Apple MLX

API: mlx.core.trunc
Strategy: Macro 'mlx.core.array(np.trunc(np.array({input})))'

Flax NNX

API: jax.numpy.trunc
Strategy: Direct Mapping

PaxML / Praxis

API: jax.numpy.trunc
Strategy: Direct Mapping