Skip to content

Commit

Permalink
Merge pull request #388 from AequilibraE/pedro/graph_no_centroids
Browse files Browse the repository at this point in the history
Pedro/graph no centroids
  • Loading branch information
jamiecook committed Mar 28, 2023
2 parents 10f10d3 + 7193ddf commit e46b74b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aequilibrae/paths/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ def __build_compressed_graph(self):

links_to_remove = np.argwhere(simplified_links >= 0)
df = pd.DataFrame(self.network, copy=True)
df = df[~df.link_id.isin(links_to_remove[:, 0])]
if links_to_remove.shape[0]:
df = df[~df.link_id.isin(links_to_remove[:, 0])]
df = df[df.a_node != df.b_node]

comp_lnk = pd.DataFrame(
Expand Down

0 comments on commit e46b74b

Please sign in to comment.