1ec3d56179d24f041df607fd1ec4fcb0a1254cf4,librosa/util/utils.py,,normalize,#Any#Any#Any#Any#Any#,536

Before Change


        // will get nans
        length[small_idx] = np.nan
        Snorm = S / length
        Snorm[np.isnan(Snorm)] = fill_norm
    else:
        // Set small values to zero by doing an inf-divide.
        // This is safe (by IEEE-754) as long as S is finite.

After Change


    if fill not in [None, False, True]:
        raise ParameterError("fill={} must be None or boolean".format(fill))

    if not np.all(np.isfinite(S)):
        raise ParameterError("Input must be finite")

    // All norms only depend on magnitude, let"s do that first
    mag = np.abs(S).astype(np.float)

    // For max/min norms, filling with 1 works
    fill_norm = 1
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: librosa/librosa
Commit Name: 1ec3d56179d24f041df607fd1ec4fcb0a1254cf4
Time: 2016-12-09
Author: brian.mcfee@nyu.edu
File Name: librosa/util/utils.py
Class Name:
Method Name: normalize


Project Name: scipy/scipy
Commit Name: a45ff3eac825bf8d322cacc3587fd5bb3cda8119
Time: 2014-11-23
Author: evgeni@burovski.me
File Name: scipy/interpolate/fitpack2.py
Class Name: UnivariateSpline
Method Name: __init__


Project Name: scipy/scipy
Commit Name: 32c97178d320be76c40703208f7712cc5fd04372
Time: 2017-04-20
Author: nikolay.mayorov@zoho.com
File Name: scipy/integrate/_py/radau.py
Class Name:
Method Name: solve_collocation_system