From 95c585eaba3101033143370f536e840228e114f0 Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 14 May 2021 18:37:09 +0000 Subject: Changed logic in SampleList to set num_cases_exists to False if all existing N are 1 --- wqflask/wqflask/show_trait/SampleList.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wqflask/wqflask/show_trait/SampleList.py b/wqflask/wqflask/show_trait/SampleList.py index f9d30dba..67768308 100644 --- a/wqflask/wqflask/show_trait/SampleList.py +++ b/wqflask/wqflask/show_trait/SampleList.py @@ -8,7 +8,6 @@ from pprint import pformat as pf from utility import Plot from utility import Bunch - class SampleList: def __init__(self, dataset, @@ -92,8 +91,10 @@ class SampleList: self.sample_list.append(sample) self.se_exists = any(sample.variance for sample in self.sample_list) - self.num_cases_exists = any( - sample.num_cases for sample in self.sample_list) + self.num_cases_exists = False + if (any(sample.num_cases for sample in self.sample_list) and + any((sample.num_cases and sample.num_cases != "1") for sample in self.sample_list)): + self.num_cases_exists = True first_attr_col = self.get_first_attr_col() for sample in self.sample_list: -- cgit v1.2.3