FillΒΆ

Creates a tensor filled with a scalar value.

Abstract Signature:

Fill(input: Tensor, value: float)

PyTorch

API: torch.fill
Strategy: Direct Mapping

JAX (Core)

API: jnp.full_like
Strategy: Direct Mapping

NumPy

API: numpy.full_like
Strategy: Direct Mapping

Keras

API: keras.ops.full_like
Strategy: Direct Mapping

TensorFlow

API: tf.fill
Strategy: Macro 'tf.fill(tf.shape({input}), {value})'

Apple MLX

API: mlx.core.full
Strategy: Macro 'mx.full({input}.shape, {value}, dtype={input}.dtype)'

Flax NNX

API: jnp.full_like
Strategy: Direct Mapping