From 2af30f3a32ed6767520b3ea76ad5cd50ff5aad1f Mon Sep 17 00:00:00 2001 From: Marcel Date: Thu, 25 May 2023 15:28:11 +0200 Subject: [PATCH] [bugfix] count index exceeded array length --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.py b/utils.py index db2dbac..91b425c 100644 --- a/utils.py +++ b/utils.py @@ -66,7 +66,7 @@ def get_time_delay_color(dt, dt_thresh): def get_warn_color(count, n_colors=20): - if count > n_colors: + if count >= n_colors: count = -1 gradient = np.linspace((240, 245, 110, 255), (250, 192, 63, 255), n_colors, dtype=int) return tuple(gradient[count])