d7b2db3c5262c82c44958afc2500efe0838f0884,osmnx/utils_graph.py,,_update_edge_keys,#,536

Before Change


    // for each unique different street, iterate its key + 1 so it"s unique
    for u, v, k in set(different_streets):
        // filter out key if it appears in data dict as we"ll pass it explicitly
        attributes = {k: v for k, v in G[u][v][k].items() if k != "key"}
        G.add_edge(u, v, key=k + 1, **attributes)
        G.remove_edge(u, v, key=k)

    return G

After Change


                different_streets.append(group.index[0])

    // for each unique different street, give it a unique key
    set_different_streets = set(different_streets)
    utils.log(f"Found {len(set_different_streets)} different streets")
    for u, v, k in set(different_streets):
        new_key = max(list(G[u][v]) + list(G[v][u])) + 1
        G.add_edge(u, v, key=new_key, **G.get_edge_data(u, v, k))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: gboeing/osmnx
Commit Name: d7b2db3c5262c82c44958afc2500efe0838f0884
Time: 2020-12-02
Author: boeing@usc.edu
File Name: osmnx/utils_graph.py
Class Name:
Method Name: _update_edge_keys


Project Name: lovit/soynlp
Commit Name: bf03e74b9b0858f2e827e6da4b0ca8d960b3b5b6
Time: 2018-11-13
Author: soy.lovit@gmail.com
File Name: soynlp/pos/_news_pos.py
Class Name: NewsPOSExtractor
Method Name: _extract_compound_nouns


Project Name: rasbt/mlxtend
Commit Name: c9e82bb1ab323d4a79793e47dbdd9204302e36af
Time: 2015-04-06
Author: se.raschka@me.com
File Name: mlxtend/file_io/find.py
Class Name:
Method Name: find_filegroups