From 309704997bddfcde182bb5cd0ffa238a9e49e0df Mon Sep 17 00:00:00 2001 From: rozetko Date: Tue, 13 Nov 2018 16:19:18 +0300 Subject: [PATCH] IndexError: list index out of range in close_filtering #240 (#243) --- analytics/analytics/utils/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/analytics/analytics/utils/common.py b/analytics/analytics/utils/common.py index 60151a9..58e3389 100644 --- a/analytics/analytics/utils/common.py +++ b/analytics/analytics/utils/common.py @@ -229,6 +229,8 @@ def get_av_model(patterns_list): return model_pat def close_filtering(pat_list, win_size): + if len(pat_list) == 0: + return [] s = [[pat_list[0]]] k = 0 for i in range(1, len(pat_list)):