ea40a555956467d98c7d321633a73cf408d9a805,skimage/color/colorlabel.py,,_match_label_with_color,#Any#Any#Any#Any#,42

Before Change



    unique_labels = list(set(label.flat))
    // Ensure that the background label is in front to match call to `chain`.
    if bg_label in unique_labels:
        unique_labels.remove(bg_label)
    unique_labels.insert(0, bg_label)

    // Modify labels and color cycle so background color is used only once.
    color_cycle = itertools.cycle(colors)

After Change


    bg_color = _rgb_vector([bg_color])

    // map labels to their ranks among all labels from small to large
    unique_labels, mapped_labels = np.unique(label, return_inverse=True)
    
    // get rank of bg_label
    bg_label_rank_list = mapped_labels[label.flat == bg_label]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: scikit-image/scikit-image
Commit Name: ea40a555956467d98c7d321633a73cf408d9a805
Time: 2016-11-08
Author: yue@berkeley.edu
File Name: skimage/color/colorlabel.py
Class Name:
Method Name: _match_label_with_color


Project Name: dirty-cat/dirty_cat
Commit Name: 1a19396d3daea14a189c4335e5df9f4072a764cc
Time: 2018-11-08
Author: maxime.cuny@inria.fr
File Name: dirty_cat/similarity_encoder.py
Class Name: SimilarityEncoder
Method Name: fit


Project Name: open-mmlab/mmdetection
Commit Name: 2d2e5c6f42b6f4b8ab4f68985b1fd7823e3be505
Time: 2021-01-13
Author: 35596075+congee524@users.noreply.github.com
File Name: docs/stat.py
Class Name:
Method Name: