quantax.utils.where#

quantax.utils.where(cond: ArrayLike, x: ArrayLike, y: ArrayLike) → NDArray | Array | LogArray#

Element-wise selection cond ? x : y that preserves the LogArray representation. If either x or y is a LogArray, the other operand is converted with from_value and the result is a LogArray. Falls back to jax.numpy.where() / numpy.where() for plain arrays.