Skip to content

Commit

Permalink
minor equality check fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kirtanp authored May 7, 2024
1 parent d8f9133 commit 22e84d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimaladj/CausalGraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def optimal_adj_set(self, treatment, outcome, L, N):
H1 = self.build_H1(treatment, outcome, L, N)
if treatment in H1.neighbors(outcome):
raise NoAdjException(EXCEPTION_NO_ADJ)
elif N == self.nodes() or set(N).issubset(
elif set(N) == set(self.nodes()) or set(N).issubset(
self.ancestors_all(L + [treatment, outcome])
):
optimal = nx.node_boundary(H1, set([outcome]))
Expand Down

0 comments on commit 22e84d8

Please sign in to comment.