41d8ba93f69e35306de63489abcfcd4f6430c3c4,librosa/display.py,,waveplot,#,212

Before Change


    if y.ndim == 1:
        y = core.resample(y, sr, target_sr, res_type="linear")
    else:
        y = np.vstack([core.resample(_, sr, target_sr) for _ in y])

    y = np.abs(y)

After Change



    util.valid_audio(y, mono=False)

    if not (util.valid_int(max_sr) and max_sr > 0):
        raise ParameterError("max_sr must be a non-negative integer")

    target_sr = sr

    if max_points is not None:
        if max_points <= 0:
            raise ParameterError("max_points must be strictly positive")

        if max_points < y.shape[-1]:
            target_sr = min(max_sr, (sr * y.shape[-1]) // max_points)

        hop_length = sr // target_sr

        if y.ndim == 1:
            y = __envelope(y, hop_length)
        else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: librosa/librosa
Commit Name: 41d8ba93f69e35306de63489abcfcd4f6430c3c4
Time: 2015-06-22
Author: brian.mcfee@nyu.edu
File Name: librosa/display.py
Class Name:
Method Name: waveplot


Project Name: nilmtk/nilmtk
Commit Name: 2c16357cf3b2a5b1265caf7d89703ef253e39df3
Time: 2014-01-07
Author: jack-list@xlk.org.uk
File Name: nilmtk/stats/electricity/single.py
Class Name:
Method Name: missing_samples_per_period


Project Name: nilmtk/nilmtk
Commit Name: cd302eee53de29de903c5467d7686f75b0b65a6c
Time: 2015-09-21
Author: jack-list@xlk.org.uk
File Name: nilmtk/disaggregate/fhmm_exact.py
Class Name: FHMM
Method Name: disaggregate