799a21efa211907c19d3afdd611ac7d70774f462,skimage/restoration/_denoise.py,,_wavelet_threshold,#Any#Any#Any#Any#Any#,338

Before Change



    if threshold is None:
        // The BayesShrink threshold from [1]_ in docstring
        threshold = sigma**2 / np.sqrt(max(img.var() - sigma**2, 0))

    denoised_detail = [{key: pywt.threshold(level[key], value=threshold,
                       mode=mode) for key in level} for level in coeffs[1:]]
    denoised_coeffs = [coeffs[0]] + [d for d in denoised_detail]
    return pywt.waverecn(denoised_coeffs, wavelet)

After Change



    if threshold is None:
        // The BayesShrink thresholds from [1]_ in docstring
        var = sigma**2
        threshold = [{key: _bayes_thresh(level[key], var) for key in level}
                     for level in coeffs[1:]]

    if np.isscalar(threshold):
        // a single threshold for all coefficient arrays
        denoised_detail = [{key: pywt.threshold(level[key],
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: scikit-image/scikit-image
Commit Name: 799a21efa211907c19d3afdd611ac7d70774f462
Time: 2016-09-06
Author: gregory.lee@cchmc.org
File Name: skimage/restoration/_denoise.py
Class Name:
Method Name: _wavelet_threshold


Project Name: drckf/paysage
Commit Name: ccdb7edd08af8736c3217f58fcae53c08e3a3af3
Time: 2017-01-15
Author: charlesfisher@Charless-MacBook-Pro.local
File Name: paysage/fit.py
Class Name: ProgressMonitor
Method Name: check_progress


Project Name: IndicoDataSolutions/finetune
Commit Name: f2a10b3ecbd0626792133f51a136138162c7f0a5
Time: 2019-05-24
Author: benlt@hotmail.co.uk
File Name: finetune/target_models/classifier.py
Class Name: Classifier
Method Name: explain