5fb0d7e873b1db026d08082af7a6c7069fb43ce9,skimage/feature/peak.py,,_get_high_intensity_peaks,#Any#Any#Any#,6
Before Change
// select num_peaks peaks
if len(coord[0]) > num_peaks:
intensities = image[coord]
idx_maxsort = np.argsort(intensities)
coord = np.transpose(coord)[idx_maxsort][-num_peaks:]
else:
coord = np.column_stack(coord)
return coord
After Change
coord = np.nonzero(mask)
intensities = image[coord]
sorted_indices = np.argsort(intensities)[::-1]
// num_peaks might be np.inf, so this check is required
if len(coord[0]) > num_peaks:
sorted_indices = sorted_indices[:num_peaks]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: scikit-image/scikit-image
Commit Name: 5fb0d7e873b1db026d08082af7a6c7069fb43ce9
Time: 2017-01-07
Author: b52@reaktor42.de
File Name: skimage/feature/peak.py
Class Name:
Method Name: _get_high_intensity_peaks
Project Name: tflearn/tflearn
Commit Name: f7748ee96c68768e3fd0c4acc687c145b9a38c2a
Time: 2017-04-06
Author: huntrax11@gmail.com
File Name: tflearn/models/dnn.py
Class Name: DNN
Method Name: predict_label
Project Name: tyarkoni/pliers
Commit Name: a0fbb8ffa36711dec3020f4afc436ca09d3d499c
Time: 2020-03-03
Author: rbrrcc@gmail.com
File Name: pliers/extractors/text.py
Class Name: BertLMExtractor
Method Name: _postprocess