We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d673d0a commit b04ea06Copy full SHA for b04ea06
causal_testing/specification/causal_dag.py
@@ -8,6 +8,7 @@
8
from typing import Union
9
10
import networkx as nx
11
+import pydot
12
13
from causal_testing.testing.base_test_case import BaseTestCase
14
@@ -133,7 +134,9 @@ class CausalDAG(nx.DiGraph):
133
134
def __init__(self, dot_path: str = None, **attr):
135
super().__init__(**attr)
136
if dot_path:
- self.graph = nx.DiGraph(nx.drawing.nx_agraph.read_dot(dot_path))
137
+ pydot_graph = pydot.graph_from_dot_file(dot_path)
138
+ self.graph = nx.DiGraph(nx.drawing.nx_pydot.from_pydot(pydot_graph[0]))
139
+ self.graph2 = nx.DiGraph(nx.drawing.nx_agraph.read_dot(dot_path))
140
else:
141
self.graph = nx.DiGraph()
142
0 commit comments