6a98de289a02db6bd0c715affac9242a52c633e3,flow/visualize/time_space_diagram.py,,get_time_space_data,#Any#Any#,76

Before Change


    }

    // simulation step size
    dt = params["sim"].sim_step

    // number of simulation steps
    max_time = max(max(data[veh_id]["time"]) for veh_id in data.keys())
    min_time = min(min(data[veh_id]["time"]) for veh_id in data.keys())
    num_steps = int((max_time - min_time)/dt)

    // Get the function from switcher dictionary
    func = switcher[params["scenario"]]

    // Execute the function
    return func(data, params, dt, num_steps)


def _merge(data, params, dt, num_steps):
    Generate position and speed data for the merge.

After Change


    all_time = []
    for veh_id in data.keys():
        all_time.extend(data[veh_id]["time"])
    all_time = np.sort(np.unique(all_time))

    // Get the function from switcher dictionary
    func = switcher[params["scenario"]]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: flow-project/flow
Commit Name: 6a98de289a02db6bd0c715affac9242a52c633e3
Time: 2019-06-10
Author: akreidieh@gmail.com
File Name: flow/visualize/time_space_diagram.py
Class Name:
Method Name: get_time_space_data


Project Name: minerva-ml/open-solution-data-science-bowl-2018
Commit Name: 1c1914df24c211aea45b42146940c9a7b770cbee
Time: 2018-07-19
Author: kamil.kaczmarek@neptune.ml
File Name: steps/preprocessing.py
Class Name: ImageReader
Method Name: transform


Project Name: rusty1s/pytorch_geometric
Commit Name: 3735f4b48f52f7703944f36284b9e9ee3d1e8e5f
Time: 2020-10-27
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/models/tgn.py
Class Name: TGN
Method Name: forward