cb82400b9fb1d3997ed02f616209485d5ef0005f,tests/test_core.py,,test_piptrack,#,486

Before Change


    for n_fft in [2048, 4096]:
        for hop_length in [None, n_fft // 4, n_fft // 2]:
            S = np.abs(librosa.stft(y, n_fft=n_fft, hop_length=hop_length))
            for fmin in [0, 100]:
                for fmax in [4000, 8000, sr // 2]:
                    for threshold in [0.1, 0.2, 0.5]:
                        yield __test, S, n_fft, hop_length, fmin, fmax, threshold


def test_piptrack_negative():

    def __test(y, sr, S, n_fft, hop_length, fmin, fmax, threshold):
        pitches, mags = librosa.piptrack(

After Change


        assert np.all(np.abs(np.log2(recovered_pitches) - np.log2(freq)) <= 1e-2)


    sr = 22050
    duration = 3.0

    for freq in [110, 220, 440, 880]:
        // Generate a sine tone
        y = np.sin(2 * np.pi * freq * np.linspace(0, duration, num=duration*sr))
        for n_fft in [1024, 2048, 4096]:
            // Using left-aligned frames eliminates reflection artifacts at the boundaries
            S = np.abs(librosa.stft(y, n_fft=n_fft, center=False))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: librosa/librosa
Commit Name: cb82400b9fb1d3997ed02f616209485d5ef0005f
Time: 2015-08-31
Author: brian.mcfee@nyu.edu
File Name: tests/test_core.py
Class Name:
Method Name: test_piptrack


Project Name: metagenome-atlas/atlas
Commit Name: a28e2dfe48dc1812d4212c6aaaac3ace6384132f
Time: 2018-05-29
Author: silas.kieser@gmail.com
File Name: atlas/report/qc_report.py
Class Name:
Method Name: get_pe_read_quality_plot


Project Name: cesium-ml/cesium
Commit Name: 9be64784de6d7d5ed1e85ca4bb380d40cf95b14a
Time: 2016-02-04
Author: brettnaul@gmail.com
File Name: mltsp/featurize_tools.py
Class Name:
Method Name: parse_ts_data