Esempio n. 1
0
 def union(self, a: DRS, b: DRS) -> DRS:
     """
     Returns elements that are in either a or b
     :param a: an iterable object
     :param b: another iterable object
     :return: the union of the two provided iterable objects
     """
     assert a.mode == b.mode, "Input parameters are not in the same mode (fields, table)"
     o_drs = a.union(b)
     return o_drs
Esempio n. 2
0
    def union(self, a: DRS, b: DRS) -> DRS:
        """
        Returns elements that are in either a or b
        :param a: an iterable object
        :param b: another iterable object
        :return: the union of the two provided iterable objects
        """
        a = self._general_to_drs(a)
        b = self._general_to_drs(b)
        self._assert_same_mode(a, b)

        o_drs = a.union(b)
        return o_drs