Skip to content

Commit

Permalink
Merge pull request #40 from causy-dev/remove-no-action
Browse files Browse the repository at this point in the history
replace do_nothing actions on graph with empty returns
  • Loading branch information
this-is-sofia authored Jun 18, 2024
2 parents 042b6ae + 478d2ba commit 749e0c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion causy/causal_discovery/constraint/orientation_rules/fci.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def process(

# if u and v are adjacent, do nothing
if graph.undirected_edge_exists(x, y):
return TestResult(u=x, v=y, action=TestResultAction.DO_NOTHING, data={})
return

# if u and v are NOT adjacent, store all shared adjacent nodes
potential_zs = set(graph.edges[x.id].keys()).intersection(
Expand Down
2 changes: 1 addition & 1 deletion causy/causal_discovery/constraint/orientation_rules/pc.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def process(

# if u and v are adjacent, do nothing
if graph.undirected_edge_exists(x, y):
return TestResult(u=x, v=y, action=TestResultAction.DO_NOTHING, data={})
return

# if u and v are NOT adjacent, store all shared adjacent nodes
potential_zs = set(graph.edges[x.id].keys()).intersection(
Expand Down

0 comments on commit 749e0c8

Please sign in to comment.