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 0d9b1d7 commit 8cf02e1Copy full SHA for 8cf02e1
causal_testing/specification/causal_dag.py
@@ -133,7 +133,9 @@ class CausalDAG(nx.DiGraph):
133
def __init__(self, dot_path: str = None, **attr):
134
super().__init__(**attr)
135
if dot_path:
136
- pydot_graph = pydot.graph_from_dot_file(dot_path)
+ with open(dot_path, 'r') as file:
137
+ dot_content = file.read().replace('\n', '')
138
+ pydot_graph = pydot.graph_from_dot_data(dot_content)
139
self.graph = nx.DiGraph(nx.drawing.nx_pydot.from_pydot(pydot_graph[0]))
140
else:
141
self.graph = nx.DiGraph()
0 commit comments