WhereΒΆ

Selects elements from x or y depending on condition.

Abstract Signature:

Where(condition: Tensor, x: Tensor, y: Tensor)

PyTorch

API: torch.where
Strategy: Direct Mapping

JAX (Core)

API: jax.numpy.where
Strategy: Direct Mapping

NumPy

API: numpy.where
Strategy: Direct Mapping

Keras

API: keras.ops.where
Strategy: Direct Mapping

TensorFlow

API: tf.where
Strategy: Direct Mapping

Apple MLX

API: mlx.core.where
Strategy: Direct Mapping

Flax NNX

API: jax.numpy.where
Strategy: Direct Mapping

PaxML / Praxis

API: jax.numpy.where
Strategy: Direct Mapping