diff --git a/causallearn/graph/Endpoint.py b/causallearn/graph/Endpoint.py index df551955..83f1ece4 100644 --- a/causallearn/graph/Endpoint.py +++ b/causallearn/graph/Endpoint.py @@ -20,4 +20,4 @@ def __str__(self): return self.name def __eq__(self, other): - return self.value == other.value + return isinstance(other, Endpoint) and self.value == other.value