Exemplo n.º 1
0
 def intersection(self, a: DRS, b: DRS) -> DRS:
     """
     Returns elements that are both in a and b
     :param a: an iterable object
     :param b: another iterable object
     :return: the intersection of the two provided iterable objects
     """
     assert a.mode == b.mode, "Input parameters are not in the same mode (fields, table)"
     o_drs = a.intersection(b)
     return o_drs
Exemplo n.º 2
0
    def intersection(self, a: DRS, b: DRS) -> DRS:
        """
        Returns elements that are both in a and b
        :param a: an iterable object
        :param b: another iterable object
        :return: the intersection 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.intersection(b)
        return o_drs