b013b12999b16e11a5b965ae3ac0c9301c6888fa,osmnx/distance.py,,add_edge_lengths,#Any#Any#,105

Before Change



    // turn the coordinates into a DataFrame indexed by u, v, k
    cols = ["u", "v", "k", "u_y", "u_x", "v_y", "v_x"]
    df = pd.DataFrame(coords, columns=cols).set_index(["u", "v", "k"])

    // calculate great circle distances, fill nulls with zeros, then round
    dists = distance.great_circle_vec(df["u_y"], df["u_x"], df["v_y"], df["v_x"])
    dists = dists.fillna(value=0).round(precision)

After Change


    // extract edge IDs and corresponding coordinates from their nodes
    uvk = tuple(G.edges)
    x = G.nodes(data="x")
    y = G.nodes(data="y")
    try:
        coords = np.array([(y[u], x[u], y[v], x[v]) for u, v, k in uvk])
    except KeyError:  // pragma: no cover
        raise KeyError("some edges missing nodes, possibly due to input data clipping issue")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: gboeing/osmnx
Commit Name: b013b12999b16e11a5b965ae3ac0c9301c6888fa
Time: 2021-04-05
Author: boeing@usc.edu
File Name: osmnx/distance.py
Class Name:
Method Name: add_edge_lengths


Project Name: gboeing/osmnx
Commit Name: 313b79ce9cc8538a78edfc82ccc7b02c23766287
Time: 2020-10-20
Author: 44049940+Labulitiolle@users.noreply.github.com
File Name: osmnx/utils_graph.py
Class Name:
Method Name: graph_from_gdfs


Project Name: bokeh/bokeh
Commit Name: 50e2de4002daa32d619c4b4f413123562b9f03de
Time: 2015-12-11
Author: lbrito@gmail.com
File Name: examples/plotting/file/custom_datetime_axis.py
Class Name:
Method Name: