diff --git a/swmmanywhere/graph_utilities.py b/swmmanywhere/graph_utilities.py index afbcd0bb..c0d654c9 100644 --- a/swmmanywhere/graph_utilities.py +++ b/swmmanywhere/graph_utilities.py @@ -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