From ac8a1734e4f19273a28de94414b27b9815ba84c1 Mon Sep 17 00:00:00 2001 From: dachengx Date: Fri, 8 Dec 2023 08:07:25 -0600 Subject: [PATCH 1/2] Remove unnecessary warning given new ptype constraints --- alea/model.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/alea/model.py b/alea/model.py index 5af572d3..5be8e707 100644 --- a/alea/model.py +++ b/alea/model.py @@ -170,11 +170,6 @@ def generate_data(self, **kwargs) -> Union[dict, list]: This implementation won't allow you to call generate_data by positional arguments. """ - if set(kwargs.keys()) - set(self.parameters.fittable): - warnings.warn( - "When you pass non-fittable parameters to generate_data, " - "you might changed the nominal values of the parameters.", - ) if not self.parameters.values_in_fit_limits(**kwargs): raise ValueError("Values are not within fit limits") generate_values = self.parameters(**kwargs) From 4dc8e94f48846d1f1acb14e8cd262fdbc15025e8 Mon Sep 17 00:00:00 2001 From: dachengx Date: Fri, 8 Dec 2023 08:24:26 -0600 Subject: [PATCH 2/2] Remove unnecessary test --- tests/test_gaussian_model.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/test_gaussian_model.py b/tests/test_gaussian_model.py index cc3710ba..42943c0d 100644 --- a/tests/test_gaussian_model.py +++ b/tests/test_gaussian_model.py @@ -35,10 +35,7 @@ def setUp(cls): def test_data_generation(self): """Test generation of data.""" self.model.data = self.model.generate_data(mu=0) - with self.assertWarns( - Warning, msg="Should raise warning when generate_data with non-fittable parameter" - ): - self.model.generate_data(mu=0, sigma=2) + self.model.generate_data(mu=0, sigma=2) def test_data_storage(self): """Test storage of data to file and retrieval of data from file."""