e843dc7c9b240266f411f30d90d05b9e7c81215d,librosa/util.py,,match_intervals,#,508

Before Change


    ends = np.minimum.outer(intervals_from[:, 1], intervals_to[:, 1])
    score = np.maximum(0, ends - starts)

    return np.argmax(score, axis=1)


@cache
def match_events(events_from, events_to):

After Change


    n_rows = int(librosa.core._MAX_MEM_BLOCK / (len(intervals_to)
                                                * intervals_to.itemsize))

    n_rows = max(1, n_rows)

    for bl_s in range(0, len(intervals_from), n_rows):
        bl_t = min(bl_s + n_rows, len(intervals_from))
        tmp_from = intervals_from[bl_s:bl_t]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: librosa/librosa
Commit Name: e843dc7c9b240266f411f30d90d05b9e7c81215d
Time: 2015-01-06
Author: brian.mcfee@nyu.edu
File Name: librosa/util.py
Class Name:
Method Name: match_intervals


Project Name: arraiy/torchgeometry
Commit Name: 5d2affa2bf09c53a6d34e288878fe1965fbc91e4
Time: 2020-11-24
Author: sj8716643@126.com
File Name: kornia/augmentation/random_generator/random_generator.py
Class Name:
Method Name: random_crop_size_generator


Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: 96ae969993c6f476314c2bfc639a67f83fe97239
Time: 2019-04-26
Author: eriklindernoren@live.se
File Name: utils/utils.py
Class Name:
Method Name: get_batch_statistics