489494cdbbd3bf9f75b37c58e15ffbbbc1dd0188,librosa/util.py,,fix_length,#,222

Before Change


        return y[:n]

    if len(y) < n:
        return np.pad(y, (0, n - len(y)), **kwargs)

    return y

After Change


        return data[slices]

    elif n < size:
        lengths = [(0, 0)] * data.ndim
        lengths[axis] = (0, size - n)
        return np.pad(data, lengths, **kwargs)

    return data

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: librosa/librosa
Commit Name: 489494cdbbd3bf9f75b37c58e15ffbbbc1dd0188
Time: 2015-01-03
Author: brian.mcfee@nyu.edu
File Name: librosa/util.py
Class Name:
Method Name: fix_length


Project Name: librosa/librosa
Commit Name: 8acf04da9110e1fdb5846c4bf511c8d9f29a6565
Time: 2014-11-06
Author: brian.mcfee@nyu.edu
File Name: librosa/util.py
Class Name:
Method Name: pad_center


Project Name: kevinzakka/recurrent-visual-attention
Commit Name: 520e8fb57b890a7249334d9e90c9ad209d0b849f
Time: 2018-02-10
Author: kevinarmandzakka@gmail.com
File Name: modules.py
Class Name: retina
Method Name: extract_patch