diff --git a/skimage/feature/peak.py b/skimage/feature/peak.py index 7580efc2..599a6e58 100644 --- a/skimage/feature/peak.py +++ b/skimage/feature/peak.py @@ -146,7 +146,7 @@ def peak_local_max(image, min_distance=10, threshold_abs=0, threshold_rel=0.1, peak_threshold = max(np.max(image.ravel()) * threshold_rel, threshold_abs) # get coordinates of peaks - coordinates = np.transpose((image > peak_threshold).nonzero()) + coordinates = np.argwhere(image > peak_threshold) if coordinates.shape[0] > num_peaks: intensities = image.flat[np.ravel_multi_index(coordinates.transpose(),image.shape)]