def onp_fun(condlist, choicelist, default):
    choicelist = [(x if (jnp.result_type(x) != jnp.bfloat16) else x.astype(onp.float32)) for x in choicelist]
    dtype = jnp.result_type(default, *choicelist)
    return onp.select(condlist, [onp.asarray(x, dtype=dtype) for x in choicelist], onp.asarray(default, dtype=dtype))
def onp_fun(condlist, choicelist, default):
    choicelist = [(x if (jnp.result_type(x) != jnp.bfloat16) else x.astype(onp.float32)) for x in choicelist]
    dtype = jnp.result_type(default, *choicelist)
    return onp.select(condlist, [onp.asarray(x, dtype=dtype) for x in choicelist], onp.asarray(default, dtype=dtype))