9b95e0f07b60b6a144893dcc506dfaf90db61c95,librosa/feature/utils.py,,stack_memory,#,119

Before Change



    data = np.pad(data, [(0, 0), padding], **kwargs)

    history = np.vstack([np.roll(data, -i * delay, axis=1) for i in range(n_steps)[::-1]])

    // Trim to original width
    if delay > 0:
        history = history[:, :t]
    else:
        history = history[:, -t:]

    // Make contiguous

After Change


    shape = list(data.shape)
    shape[0] = shape[0] * n_steps
    shape[1] = t
    shape = tuple(shape)

    // Construct the output array to match layout and dtype of input
    history = np.empty_like(data, shape=shape)

    // Populate the output array
    __stack(history, data, n_steps, delay)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


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


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: scikit-image/scikit-image
Commit Name: 416c73145b22ceb605a68260f67734b0208b63ef
Time: 2019-12-30
Author: gregory.lee@cchmc.org
File Name: skimage/filters/_window.py
Class Name:
Method Name: window