From 3c5aed6a41f9acbdd5a25ecaa143d113dd5bb2c7 Mon Sep 17 00:00:00 2001 From: tyrin Date: Thu, 22 May 2025 17:22:52 +0300 Subject: [PATCH] fix bayesian limits being lists in the json output --- views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/views.py b/views.py index 7d6dc3b..93397bd 100644 --- a/views.py +++ b/views.py @@ -262,8 +262,9 @@ class UpperLimitView(APIView): confidence_level=confidence_level, ) - bayesian_count_ul = high - bayesian_count_ll = low + # because poisson_conf_interval returns lists + bayesian_count_ul = high[0] + bayesian_count_ll = low[0] bayesian_rate_ul = bayesian_count_ul / t / EEF # count rate limits bayesian_rate_ll = bayesian_count_ll / t / EEF