80b255be607e1f7b4a42f4b346b4a9606f107744,librosa/util/utils.py,,match_events,#Any#Any#Any#Any#,842

Before Change



            // If both left and right index have equal difference
            // Go for the lower match
            if closest_ind != 0:
                left_amount = abs(sorted_from_num - sorted_to[closest_ind - 1])
                right_amount = abs(sorted_from_num - sorted_to[closest_ind])

                if left_amount <= right_amount:
                    closest_ind -= 1
        elif not left:
            // Get corresponding element from sorted_from
            sorted_from_num = sorted_from[ind]

After Change


        output[ind] = closest_ind

    // undo sorting
    solutions = np.empty_like(output)
    solutions[from_idx] = output

    return output
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: librosa/librosa
Commit Name: 80b255be607e1f7b4a42f4b346b4a9606f107744
Time: 2018-03-21
Author: danalee96@gmail.com
File Name: librosa/util/utils.py
Class Name:
Method Name: match_events


Project Name: scikit-image/scikit-image
Commit Name: d4168b665ee8735178f1be989bbda4cb314fe1fe
Time: 2016-08-10
Author: gregory.lee@cchmc.org
File Name: skimage/restoration/_denoise.py
Class Name:
Method Name: denoise_wavelet


Project Name: geomstats/geomstats
Commit Name: 36bf1cd036d852d10b189727d43fee6ee0b6c66c
Time: 2020-04-02
Author: 62605255+pchauchat@users.noreply.github.com
File Name: geomstats/geometry/special_euclidean.py
Class Name: SpecialEuclidean
Method Name: inverse


Project Name: librosa/librosa
Commit Name: 9b95e0f07b60b6a144893dcc506dfaf90db61c95
Time: 2020-05-18
Author: bmcfee@users.noreply.github.com
File Name: librosa/feature/utils.py
Class Name:
Method Name: stack_memory