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

Before Change


    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

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: 3

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: pantsbuild/pants
Commit Name: dcdb55f96217e4f888460c384d6e5a3bf8ecbf29
Time: 2016-09-03
Author: yujieproject@gmail.com
File Name: src/python/pants/backend/graph_info/tasks/dependees.py
Class Name: ReverseDepmap
Method Name: console_output


Project Name: tensorflow/tensorboard
Commit Name: ac9357468c74c0780a654598ca822d476cdd6c03
Time: 2018-02-27
Author: nfelt@users.noreply.github.com
File Name: tensorboard/plugins/core/core_plugin.py
Class Name: CorePlugin
Method Name: _serve_runs