Skip to content

Commit

Permalink
Update graph_utilities.py
Browse files Browse the repository at this point in the history
to stop 0**-1 or similar
  • Loading branch information
Dobson committed Mar 19, 2024
1 parent 4f2c1c7 commit af58539
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion swmmanywhere/graph_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ def __call__(self, G: nx.Graph,
total_weight = 0
for attr, bds in bounds.items():
# Normalise
weight = (d[attr] - bds[0]) / (bds[1] - bds[0])
weight = (d[attr] - bds[0]) / (bds[1] - bds[0]) + 1e-10
# Exponent
weight = weight ** getattr(topology_derivation,f'{attr}_exponent')
# Scaling
Expand Down

0 comments on commit af58539

Please sign in to comment.