Skip to content

Commit

Permalink
precommit to ml
Browse files Browse the repository at this point in the history
  • Loading branch information
ntalluri committed Mar 12, 2024
1 parent 278b761 commit 4dfd018
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spras/analysis/ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def summarize_networks(file_paths: Iterable[Union[str, PathLike]]) -> pd.DataFra
lines = f.readlines()

if len(lines) > 0:
lines.pop(0) # process header line
lines.pop(0) # process header line

edges = []
for line in lines:
parts = line.split('\t')
Expand All @@ -61,7 +61,7 @@ def summarize_networks(file_paths: Iterable[Union[str, PathLike]]) -> pd.DataFra
raise ValueError(f"direction is {direction}, rather than U or D")
elif len(parts) != 0:
raise ValueError(f"In file {file}, expected line {line} to have 4 values, but found {len(parts)} values.")

# getting the algorithm name
p = PurePath(file)
edge_tuples.append((p.parts[-2], edges))
Expand Down

0 comments on commit 4dfd018

Please sign in to comment.