Skip to content

Commit c003899

Browse files
committed
Formatting standardization.
1 parent d9c136f commit c003899

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: textplot/graphs.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def write_graphml(self, path):
6363
6464
:param path: The file path.
6565
"""
66+
6667
nx.readwrite.graphml.write_graphml(self.graph, path)
6768

6869

@@ -96,6 +97,7 @@ def build(self, matrix, skim_depth=10, d_weights=False):
9697
if d_weights: weight = 1-weight
9798

9899
n2 = matrix.text.unstem(term)
99-
# nx does not handle numpy types well when writing graphml,
100-
# so ensure that weight is a regular float.
100+
101+
# NetworkX does not handle numpy types when writing graphml,
102+
# so we cast the weight to a regular float.
101103
self.graph.add_edge(n1, n2, weight=float(weight))

0 commit comments

Comments
 (0)