Skip to content

Commit

Permalink
simplified initialisation for the different specialisations of adjace…
Browse files Browse the repository at this point in the history
…ncy graphs
  • Loading branch information
eileen-kuehn committed Jul 29, 2018
1 parent e38d44e commit 0b00524
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions graphi/graph_io/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,7 @@ def graph_reader(
else:
raise TypeError("parameter 'nodes_header' must be True, False, an iterable or a callable")
# fill graph with nodes
if value_bound:
graph = bounded_graph.Bounded(nodes, value_bound=value_bound, undirected=undirected)
elif undirected:
graph = undirected_graph.Undirected(nodes)
else:
graph = adjacency_graph.AdjacencyGraph(nodes, undirected=undirected, value_bound=value_bound)
graph = adjacency_graph.AdjacencyGraph(nodes, undirected=undirected, value_bound=value_bound)
# still need to consume the first line as content if not unset
iter_rows = reader if first_line is None else itertools.chain([first_line], reader)
for row_idx, row in enumerate(iter_rows):
Expand Down

0 comments on commit 0b00524

Please sign in to comment.