01af2ab25c4d3f40191ce255750a3cd196ea8671,librosa/segment.py,,structure_feature,#Any#Any#Any#,183

Before Change



    """

    t = rec.shape[1]

    if pad and not inverse:
        // If we don"t assume that the signal loops,
        // stack zeros underneath in the recurrence plot.
        struct = np.pad(rec, [(0, t), (0, 0)], mode="constant")
    else:
        struct = rec.copy()

    if inverse:
        direction = +1
    else:
        direction = -1

    for i in range(1, t):
        struct[:, i] = np.roll(struct[:, i], direction * i, axis=-1)

    if inverse and pad:
        struct = struct[:t]

    // Make column-contiguous
    return np.ascontiguousarray(struct.T).T


def timelag_filter(function, pad=True, index=0):
    """Filtering in the time-lag domain.

After Change



    """
    if inverse:
        return lag_to_recurrence(rec)
    else:
        return recurrence_to_lag(rec, pad=pad)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: librosa/librosa
Commit Name: 01af2ab25c4d3f40191ce255750a3cd196ea8671
Time: 2015-02-17
Author: brian.mcfee@nyu.edu
File Name: librosa/segment.py
Class Name:
Method Name: structure_feature


Project Name: librosa/librosa
Commit Name: 4405851c85927f145388653d98c0ec62da2855d9
Time: 2015-01-18
Author: brian.mcfee@nyu.edu
File Name: librosa/core/constantq.py
Class Name:
Method Name: cqt


Project Name: librosa/librosa
Commit Name: 7fc10ba3229c7ac4201d8c063fe3461376120a01
Time: 2019-08-13
Author: brian.mcfee@nyu.edu
File Name: librosa/segment.py
Class Name:
Method Name: lag_to_recurrence