Hi Hail team,
I was just wondering if there is a preference for using coalesce
vs or_else
when there are only two expressions being compared?
Thanks,
Julia
Hi Hail team,
I was just wondering if there is a preference for using coalesce
vs or_else
when there are only two expressions being compared?
Thanks,
Julia
Nope:
@typecheck(a=expr_any, b=expr_any)
def or_else(a, b):
"""..."""
a, b, success = unify_exprs(a, b)
if not success:
raise TypeError(f"'or_else' requires the 'a' and 'b' arguments to have the same type\n"
f" a: type '{a.dtype}'\n"
f" b: type '{b.dtype}'")
return coalesce(a, b)
Perfect, thank you!