def combine_with(self, additional_constraints):
    """Combines two sets of constraints into a coherent single set."""
    x = additional_constraints
    if not isinstance(additional_constraints, AffineWarpConstraints):
      x = AffineWarpConstraints(additional_constraints)
    new_constraints = []
    for left, right in zip(self._constraints, x.constraints):
      new_constraints.append([self._combine(x, y) for x, y in zip(left, right)])
    return AffineWarpConstraints(new_constraints)
def combine_with ( self , additional_constraints ) : x = additional_constraints if not isinstance ( additional_constraints , AffineWarpConstraints ) : x = AffineWarpConstraints ( additional_constraints ) new_constraints = [ ] for left , right in zip ( self . _constraints , x . constraints ) : new_constraints . append ( [ self . _combine ( x , y ) for x , y in zip ( left , right ) ] ) return AffineWarpConstraints ( new_constraints )
Combines two sets of constraints into a coherent single set.