Beispiel #1
0
 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
         })
Beispiel #2
0
 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