def __and__(self, other):
        """
        Returns the largest rectangle that is contained by both rectangles.
        """
        if other.contains(self):
            return self
        if self.contains(other):
            return other
        if self.contains(other.mins):
            retval = Rect(np.maximum(self.mins, other.mins),
                          np.minimum(self.maxes, other.maxes))
            if retval:
                return retval
        return Rect()
def __and__ ( self , other ) : if other . contains ( self ) : return self if self . contains ( other ) : return other if self . contains ( other . mins ) : retval = Rect ( np . maximum ( self . mins , other . mins ) , np . minimum ( self . maxes , other . maxes ) ) if retval : return retval return Rect ( )
Returns the largest rectangle that is contained by both rectangles.