Skip to content

__merge__

builtin · libnexusinterp/corefcn/data-proprietary.cc

: m = __merge__ (mask, tval, fval)
: m = __ifelse__ (mask, tval, fval)

Select between tval and fval according to mask. A scalar mask returns one of the two values unchanged; an array mask gives, at every position, the element of tval where the mask is true and the element of fval elsewhere. tval and fval must each be a scalar or have the size of mask.