Closed sk2 closed 10 years ago
Problem was in setting the defaults as only a single graph
for (src, dst) in graph.edges(): for (key, val) in edge_defaults.items(): if key not in graph[src][dst]: graph[src][dst][key] = val
now sets on the data dict:
for src, dst, data in graph.edges(data=True): for key, val in edge_defaults.items(): if key not in data: data[key] = val
which works for both cases
Problem was in setting the defaults as only a single graph
now sets on the data dict:
which works for both cases