def select(b, t, f):
    """
    tf.where equivalent but use broadcasting
    :param b:
    :param t:
    :param f:
    :return:
    """
    b = b.to_float()
    value = b * t + (1.0 - b) * f
    return value
