I'm iterating over edges in a NetworkX MultiDiGraph like so:
for u, v, k, d in g.edges(keys=True, data=True):
...
In some instances, I find id
and key
keys in the dictionary d
, but I can't figure out when or why these are created, except that it only happens when u==v
.
I have been unable to find a minimal example of what causes this. It seems strange to me that the key k
would be duplicated in the attr dict d
.