def _mat(dst, src): for i in dst.otype.v_idx: cgpt.unary(dst.v_obj[i], src.v_obj[i], { **{ "operator": operator }, **extra_params })
def _mat(first, second=None): if second is not None: dst = first src = gpt.eval(second) else: src = gpt.eval(first) dst = gpt.lattice(src) for i in dst.otype.v_idx: cgpt.unary(dst.v_obj[i], src.v_obj[i], {**{"operator": operator}, **extra_params}) return dst