9864258e6714791b7e0a62717f9efbae96da902b,imgaug/augmenters/blend.py,Alpha,_augment_nonimages,#Alpha#Any#Any#Any#Any#Any#,404

Before Change


                    augmentables[i].shape[2]
                    if len(augmentables[i].shape) >= 3
                    else 1)
                alpha = np.average(alphas[i, 0:nb_channels_i])
            else:
                alpha = alphas[i, 0]
            assert 0 <= alpha <= 1.0, (
                "Expected "alpha" to be in the interval [0.0, 1.0]. "

After Change


                alphas_i = alphas[i, 0:nb_channels_i]
                // the condition is required here if all images have a channel
                // axis of size 0
                alpha = np.average(alphas_i) if alphas_i.size > 0 else 1.0
            else:
                // the condition is required here if all images have a channel
                // axis of size 0
                alpha = alphas[i, 0] if alphas.size > 0 else 1.0
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: aleju/imgaug
Commit Name: 9864258e6714791b7e0a62717f9efbae96da902b
Time: 2019-09-22
Author: kontakt@ajung.name
File Name: imgaug/augmenters/blend.py
Class Name: Alpha
Method Name: _augment_nonimages


Project Name: aleju/imgaug
Commit Name: 9864258e6714791b7e0a62717f9efbae96da902b
Time: 2019-09-22
Author: kontakt@ajung.name
File Name: imgaug/augmenters/blend.py
Class Name: AlphaElementwise
Method Name: _augment_coordinate_based


Project Name: analysiscenter/batchflow
Commit Name: 61570406a54b612908b37f4028cd47df4a70781a
Time: 2019-08-30
Author: nikita_007_94@mail.ru
File Name: batchflow/models/metrics/regression.py
Class Name: RegressionMetrics
Method Name: r2_score