f1e415f5719f9175e3dd59b447de17ef0c40fe76,skimage/feature/peak.py,,peak_local_max,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,22

Before Change


    // In the case of labels, recursively build and return an output
    // operating on each label separately
    if labels is not None:
        labels_copy = labels.copy()
        label_values = np.unique(labels_copy)
        // Reorder label values to have consecutive integers (no gaps)
        if np.any(np.diff(label_values) != 1):
            mask = labels_copy >= 1
            labels_copy[mask] = 1 + rank_order(labels_copy[mask])[0].astype(labels_copy.dtype)

After Change


    // operating on each label separately
    if labels is not None:
        labels = relabel_sequential(labels)[0]
        for label in range(1, labels.max()+1):
            maskim = labels == label
            out += peak_local_max(image * maskim, min_distance=min_distance,
                                  threshold_abs=threshold_abs,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: scikit-image/scikit-image
Commit Name: f1e415f5719f9175e3dd59b447de17ef0c40fe76
Time: 2016-10-20
Author: metz.jp@gmail.com
File Name: skimage/feature/peak.py
Class Name:
Method Name: peak_local_max


Project Name: luispedro/mahotas
Commit Name: 3035cc365d6a2d4a379212b158eb577cdd2bd39c
Time: 2012-11-28
Author: luis@luispedro.org
File Name: mahotas/tests/test_median_filter.py
Class Name:
Method Name: _slow_rank_filter


Project Name: NifTK/NiftyNet
Commit Name: dc08ab20598c6dcf2839649b5f2ec4897f0b8374
Time: 2017-08-10
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/mean_variance_normalisation.py
Class Name:
Method Name: whitening_transformation


Project Name: nilearn/nilearn
Commit Name: 897565a0174f93d750b22bb846bd0f4c16e76a01
Time: 2017-02-13
Author: gael.varoquaux@normalesup.org
File Name: nilearn/regions/region_extractor.py
Class Name:
Method Name: extract_regions_labels_img