From 7d3196bf217bd88ce3e48cdc552dd542c5d41308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludger=20K=C3=BCperkoch?= Date: Mon, 9 Oct 2017 14:40:26 +0200 Subject: [PATCH] [Bugfix] argrelmax not working if array contains only one element. --- PyLoT.py | 0 pylot/core/pick/picker.py | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 PyLoT.py diff --git a/PyLoT.py b/PyLoT.py old mode 100644 new mode 100755 diff --git a/pylot/core/pick/picker.py b/pylot/core/pick/picker.py index 87000468..baf36653 100644 --- a/pylot/core/pick/picker.py +++ b/pylot/core/pick/picker.py @@ -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: