Make peak_local_max
return indices always sorted
#2432
Labels
🔰 Good first issue
A good task for those new to the library
⏩ type: Enhancement
Improve existing features
Currently, the method
peak_local_max
returns sorted indices (w.r.t. the intensities) if the number of indices is> num_peaks
. I do understand that it is nowhere stated thatpeak_local_max
does that, it is merely a side-effect, but I found it quite convenient.Different behaviour arises when the number of indices
<= num_peaks
, in which case the indices are not sorted.This is somewhat counter-intuitive and I therefore propose to make it the documented default to return indices sorted by their intensities in decreasing order.
I would be willing to write a PR for this.
The text was updated successfully, but these errors were encountered: