Skip to content

Commit e8cc29d

Browse files
Update GeneralGraph.py
made a mistake in variable assignment updating subgraph to not have axis out of bound error Signed-off-by: JanMarcoRuizdeVargas <[email protected]>
1 parent 06fe30f commit e8cc29d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

causallearn/graph/GeneralGraph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,8 +874,8 @@ def subgraph(self, nodes: List[Node]):
874874
if not (self.nodes[i] in nodes):
875875
nodes_to_delete .append(i)
876876

877-
np.delete(graph, nodes_to_delete, axis = 0)
878-
np.delete(graph, nodes_to_delete, axis = 1)
877+
graph = np.delete(graph, nodes_to_delete, axis = 0)
878+
graph = np.delete(graph, nodes_to_delete, axis = 1)
879879

880880
subgraph.graph = graph
881881
subgraph.reconstitute_dpath(subgraph.get_graph_edges())

0 commit comments

Comments
 (0)