[Bugfix] argrelmax not working if array contains only one element.

This commit is contained in:
Ludger Küperkoch 2017-10-09 14:40:26 +02:00
parent da6f35d76b
commit 7d3196bf21
2 changed files with 2 additions and 2 deletions

0
PyLoT.py Normal file → Executable file
View File

View File

@ -251,8 +251,8 @@ class AICPicker(AutoPicker):
except IndexError:
print("Slope Calculation: empty array islope, check signal window")
return
if len(dataslope) < 1:
print('No data in slope window found!')
if len(dataslope) <= 1:
print('No or not enough data in slope window found!')
return
imaxs, = argrelmax(dataslope)
if imaxs.size: