Where - version 9#

This page documents version 9 of operator Where. See Where for the latest version (since version 16).

  • Domain: ai.onnx

  • Since version: 9

Return elements, either from X or Y, depending on condition.

Inputs

  • condition (B): When True (nonzero), yield X, otherwise yield Y

  • X (T): values selected at indices where condition is True

  • Y (T): values selected at indices where condition is False

Outputs

  • output (T): Tensor of shape equal to the broadcasted shape of condition, X, and Y.

Type Constraints

  • B: Constrain to boolean tensors. Allowed types: tensor(bool).

  • T: Constrain input and output types to all tensor types. Allowed types: tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8).