quantax.utils.where#
- quantax.utils.where(cond: ArrayLike, x: ArrayLike, y: ArrayLike) NDArray | Array | LogArray#
Element-wise selection
cond ? x : ythat preserves theLogArrayrepresentation. If eitherxoryis aLogArray, the other operand is converted withfrom_valueand the result is aLogArray. Falls back tojax.numpy.where()/numpy.where()for plain arrays.