2d860d3bb02b904bd8f482be76f253d0e26cafb4,mathics/builtin/image.py,DominantColors,apply,#DominantColors#Any#Any#Any#Any#,1285

Before Change


        max_coverage = min(num_pixels, int(num_pixels * py_max_color_coverage))

        for prototype, coverage, members in dominant:
            if len(result) >= at_most:
                break
            if max_coverage >= coverage > min_coverage:
                result.append(Expression("RGBColor", *prototype))

        return Expression("List", *result)

After Change


                if max_coverage >= coverage > min_coverage:
                    yield Expression("RGBColor", *prototype)

        return Expression("List", *itertools.islice(result(), 0, at_most))


// pixel access
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: mathics/Mathics
Commit Name: 2d860d3bb02b904bd8f482be76f253d0e26cafb4
Time: 2016-09-15
Author: Bernhard.Liebl@gmx.org
File Name: mathics/builtin/image.py
Class Name: DominantColors
Method Name: apply


Project Name: pandas-dev/pandas
Commit Name: a347bc1e62b9f2a09e121019e9815f035c48e88a
Time: 2020-11-07
Author: 41443370+ivanovmg@users.noreply.github.com
File Name: pandas/plotting/_matplotlib/style.py
Class Name:
Method Name: _cycle_colors


Project Name: jsalt18-sentence-repl/jiant
Commit Name: e82b6a0ab63a0e73e8fbc69b34bde87b1580a746
Time: 2018-07-03
Author: wang.alex.c@gmail.com
File Name: src/trainer.py
Class Name: SamplingMultiTaskTrainer
Method Name: _setup_training