a1383be585a1798a3333139c4c1be149d3c5a454,padatious/util.py,,resolve_conflicts,#,128

Before Change


    new_in, new_out = [], []
    for i, inp in enumerate(inputs):
        found_duplicate = False
        for j in range(i + 1, len(inputs)):
            if inp == inputs[j]:
                found_duplicate = True
                if outputs[i] > outputs[j]:
                    outputs[j] = outputs[i]

After Change


            data[tup] = [out]

    inputs, outputs = [], []
    for inp, outs in data.items():
        inputs.append(list(inp))
        outputs.append(np.maximum.reduce(outs))
    return inputs, outputs
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: MycroftAI/padatious
Commit Name: a1383be585a1798a3333139c4c1be149d3c5a454
Time: 2017-09-15
Author: matthew3311999@gmail.com
File Name: padatious/util.py
Class Name:
Method Name: resolve_conflicts


Project Name: pandas-dev/pandas
Commit Name: 7368b2a4e8c6b32b975a62d64efb65bbd6bd1df1
Time: 2020-11-24
Author: 41443370+ivanovmg@users.noreply.github.com
File Name: pandas/io/formats/excel.py
Class Name: ExcelFormatter
Method Name: _format_header_mi


Project Name: nicodv/kmodes
Commit Name: 5db9119652e6dbdb52086040db1898d00c3f2b63
Time: 2013-09-10
Author: njdevos@gmail.com
File Name: kmodes.py
Class Name: FuzzyCentroidsKModes
Method Name: get_fuzzy_dissim