From fd99ea3e657109f0856dd1ff67764f844ae4da44 Mon Sep 17 00:00:00 2001 From: AntonioVitoMastromarino Date: Mon, 4 Mar 2024 13:26:55 +0000 Subject: [PATCH] style --- epios/post_process_update.py | 2 +- epios/sampling_maker.py | 2 +- epios/tests/test_post_process_update.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/epios/post_process_update.py b/epios/post_process_update.py index f1cd94f..0a055a7 100644 --- a/epios/post_process_update.py +++ b/epios/post_process_update.py @@ -659,7 +659,7 @@ def _wrapper_Age_Base(self, sampling_method, sample_size, time_sample, infected_rate = list(ReScaler(false_positive=false_positive, false_negative=false_negative, smoothing=smoothing)(observ)) - + elif sample_strategy == 'Random': # Change people sampled at each sample time point people = [] diff --git a/epios/sampling_maker.py b/epios/sampling_maker.py index a6b9c15..ffc9fe5 100644 --- a/epios/sampling_maker.py +++ b/epios/sampling_maker.py @@ -104,7 +104,7 @@ def count_negative(x): return array(obs).sum() * len(x.index) / len(self.data.columns) except ZeroDivisionError: return nan - + if keep_track: STATUSES = self.data.loc[sampling_times, people] result = STATUSES.apply(lambda x: x.apply(self._testresult)) diff --git a/epios/tests/test_post_process_update.py b/epios/tests/test_post_process_update.py index d39a12e..787ceed 100644 --- a/epios/tests/test_post_process_update.py +++ b/epios/tests/test_post_process_update.py @@ -230,6 +230,7 @@ def test_sampled_non_responder(self): np.testing.assert_equal(res[0], [self.range6, [np.nan, 1.0, 1.0, 1.0, np.nan, 1.0]]) except AssertionError: self.fail(str(res[0]) + ' is not ' + str([self.range6, [np.nan, 1.0, 1.0, 1.0, np.nan, 1.0]])) + def test_compare(self): _, diff = self.processor.predict.AgeRegion(6, self.range6, comparison=True, data_store_path=self.path, gen_plot=True,