quantax.utils.where#
- quantax.utils.where(cond: ArrayLike, x: ArrayLike, y: ArrayLike) NDArray | Array | LogArray | ScaleArray#
Element-wise selection
cond ? x : ythat preserves theLogArray/ScaleArrayrepresentation.If either
xoryis aScaleArraythe result is aScaleArray; otherwise if either is aLogArraythe result is aLogArray. In both cases the other operand is converted withfrom_value. Falls back tojax.numpy.where()/numpy.where()for plain arrays.