Skip to content

Commit

Permalink
Update county splits implementation to use cached graph attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
InnovativeInventor committed Feb 15, 2022
1 parent 989c9c5 commit a97beed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gerrychain/updaters/county_splits.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def compute_county_splits(partition, county_field, partition_field):
if not partition.parent:
county_dict = dict()

for node in partition.graph.nodes:
county = partition.graph.nodes[node][county_field]
for node in partition.graph.node_indices:
county = partition.graph.lookup(node, county_field)
if county in county_dict:
split, nodes, seen = county_dict[county]
else:
Expand Down

0 comments on commit a97beed

Please sign in to comment.