[Bugfix] argrelmax not working if array contains only one element.
This commit is contained in:
parent
da6f35d76b
commit
7d3196bf21
@ -251,8 +251,8 @@ class AICPicker(AutoPicker):
|
|||||||
except IndexError:
|
except IndexError:
|
||||||
print("Slope Calculation: empty array islope, check signal window")
|
print("Slope Calculation: empty array islope, check signal window")
|
||||||
return
|
return
|
||||||
if len(dataslope) < 1:
|
if len(dataslope) <= 1:
|
||||||
print('No data in slope window found!')
|
print('No or not enough data in slope window found!')
|
||||||
return
|
return
|
||||||
imaxs, = argrelmax(dataslope)
|
imaxs, = argrelmax(dataslope)
|
||||||
if imaxs.size:
|
if imaxs.size:
|
||||||
|
Loading…
Reference in New Issue
Block a user