From fab7d7ab7eae5d25cfca3bed697a3a668d85bef6 Mon Sep 17 00:00:00 2001 From: Michael Clerx Date: Fri, 6 Feb 2026 13:45:45 +0000 Subject: [PATCH 1/3] Removed ToyLogPDF.suggested_bounds() method and implementations. Closes #1726. --- pints/tests/test_toy_annulus_logpdf.py | 20 -------------- pints/tests/test_toy_classes.py | 3 +-- pints/tests/test_toy_cone_logpdf.py | 16 ----------- pints/tests/test_toy_eight_schools_logpdf.py | 6 ----- ...t_toy_german_credit_hierarchical_logpdf.py | 5 +--- pints/tests/test_toy_german_credit_logpdf.py | 5 +--- ...st_toy_high_dimensional_gaussian_logpdf.py | 12 --------- .../test_toy_multimodal_gaussian_logpdf.py | 27 ------------------- pints/tests/test_toy_neals_funnel_logpdf.py | 20 -------------- pints/tests/test_toy_rosenbrock.py | 7 +---- pints/tests/test_toy_simple_egg_box_logpdf.py | 7 +---- .../tests/test_toy_twisted_gaussian_logpdf.py | 7 ----- pints/toy/_annulus.py | 13 +-------- pints/toy/_cone.py | 9 +------ pints/toy/_eight_schools.py | 6 ----- pints/toy/_german_credit.py | 5 ---- pints/toy/_german_credit_hierarchical.py | 5 ---- pints/toy/_high_dimensional_gaussian.py | 7 ----- pints/toy/_multimodal_gaussian.py | 10 ------- pints/toy/_neals_funnel.py | 7 ----- pints/toy/_rosenbrock.py | 9 +------ pints/toy/_simple_egg_box.py | 5 ---- pints/toy/_toy_classes.py | 6 ----- pints/toy/_twisted_gaussian_banana.py | 6 ----- 24 files changed, 8 insertions(+), 215 deletions(-) diff --git a/pints/tests/test_toy_annulus_logpdf.py b/pints/tests/test_toy_annulus_logpdf.py index a2917780c4..3f1dff027f 100755 --- a/pints/tests/test_toy_annulus_logpdf.py +++ b/pints/tests/test_toy_annulus_logpdf.py @@ -68,26 +68,6 @@ def test_bad_constructors(self): self.assertRaises( ValueError, pints.toy.AnnulusLogPDF, 3, 1, -1) - def test_suggested_bounds(self): - # Tests suggested_bounds() method - - f = pints.toy.AnnulusLogPDF() - bounds = f.suggested_bounds() - a_val = 55 - self.assertTrue(np.array_equal([[-a_val, -a_val], [a_val, a_val]], - bounds)) - r0 = 25 - dimensions = 5 - sigma = 20 - f = pints.toy.AnnulusLogPDF(dimensions=dimensions, - r0=r0, - sigma=sigma) - bounds = f.suggested_bounds() - r0_magnitude = (r0 + sigma) * (5**(1.0 / (dimensions - 1.0))) - self.assertEqual(bounds[0][0], -r0_magnitude) - self.assertEqual(bounds[1][0], r0_magnitude) - self.assertTrue(np.array_equal(np.array(bounds).shape, [2, 5])) - def test_distance_function(self): # Tests distance function diff --git a/pints/tests/test_toy_classes.py b/pints/tests/test_toy_classes.py index 34f8dc057e..3f87815619 100755 --- a/pints/tests/test_toy_classes.py +++ b/pints/tests/test_toy_classes.py @@ -21,8 +21,7 @@ def test_run(self): model = pints.toy.Hes1Model() vals = [1, 2, 3] model.set_initial_conditions(vals) - self.assertTrue(np.array_equal(model.initial_conditions(), - vals)) + self.assertTrue(np.array_equal(model.initial_conditions(), vals)) if __name__ == '__main__': diff --git a/pints/tests/test_toy_cone_logpdf.py b/pints/tests/test_toy_cone_logpdf.py index f6f9345302..35b79acb01 100755 --- a/pints/tests/test_toy_cone_logpdf.py +++ b/pints/tests/test_toy_cone_logpdf.py @@ -70,22 +70,6 @@ def test_bad_constructors(self): self.assertRaises(ValueError, f.__call__, [1, 2, 3]) self.assertRaises(ValueError, f.__call__, [1, 2, 3, 4, 5]) - def test_bounds(self): - # Tests suggested_bounds() - - f = pints.toy.ConeLogPDF() - bounds = f.suggested_bounds() - self.assertTrue(np.array_equal([[-1000, -1000], [1000, 1000]], - bounds)) - beta = 3 - dimensions = 4 - f = pints.toy.ConeLogPDF(beta=beta, dimensions=dimensions) - magnitude = 1000 - bounds = np.tile([-magnitude, magnitude], (dimensions, 1)) - self.assertEqual(bounds[0][0], -magnitude) - self.assertEqual(bounds[0][1], magnitude) - self.assertTrue(np.array_equal(np.array(bounds).shape, [4, 2])) - def test_sensitivities(self): # Tests sensitivities diff --git a/pints/tests/test_toy_eight_schools_logpdf.py b/pints/tests/test_toy_eight_schools_logpdf.py index bb79fa9c6c..69b1696949 100755 --- a/pints/tests/test_toy_eight_schools_logpdf.py +++ b/pints/tests/test_toy_eight_schools_logpdf.py @@ -83,12 +83,6 @@ def test_negative_sd(self): self.assertEqual(logp, -np.inf) self.assertTrue(np.array_equal(grad, np.full([1, 10], -np.inf))) - def test_bounds(self): - """ Tests suggested_bounds() """ - f = pints.toy.EightSchoolsLogPDF() - bounds = f.suggested_bounds() - self.assertEqual(bounds[0][1], 0) - if __name__ == '__main__': unittest.main() diff --git a/pints/tests/test_toy_german_credit_hierarchical_logpdf.py b/pints/tests/test_toy_german_credit_hierarchical_logpdf.py index 1cb3e50713..d84d5a9493 100755 --- a/pints/tests/test_toy_german_credit_hierarchical_logpdf.py +++ b/pints/tests/test_toy_german_credit_hierarchical_logpdf.py @@ -71,11 +71,8 @@ def test_sensitivities(self): self.assertAlmostEqual(dp[1], -700.8386959844057, places=6) def test_givens(self): - # tests whether boundaries are correct and n_parameters + # tests n_parameters self.assertEqual(326, self.model.n_parameters()) - borders = self.model.suggested_bounds() - self.assertEqual(borders[0][0], -100) - self.assertEqual(borders[1][0], 100) if __name__ == '__main__': diff --git a/pints/tests/test_toy_german_credit_logpdf.py b/pints/tests/test_toy_german_credit_logpdf.py index c12b5d0d5b..ed302ab5ab 100755 --- a/pints/tests/test_toy_german_credit_logpdf.py +++ b/pints/tests/test_toy_german_credit_logpdf.py @@ -71,11 +71,8 @@ def test_sensitivities(self): self.assertAlmostEqual(dp[1], -160.7785147438439, places=6) def test_givens(self): - # tests whether boundaries are correct and n_parameters + # tests n_parameters self.assertEqual(25, self.model.n_parameters()) - borders = self.model.suggested_bounds() - self.assertEqual(borders[0][0], -100) - self.assertEqual(borders[1][0], 100) if __name__ == '__main__': diff --git a/pints/tests/test_toy_high_dimensional_gaussian_logpdf.py b/pints/tests/test_toy_high_dimensional_gaussian_logpdf.py index ec4039870d..339116fe9f 100755 --- a/pints/tests/test_toy_high_dimensional_gaussian_logpdf.py +++ b/pints/tests/test_toy_high_dimensional_gaussian_logpdf.py @@ -67,18 +67,6 @@ def test_high_dimensional_log_pdf(self): f([1, 2]), scipy.stats.multivariate_normal.logpdf([1, 2], mean, cov)) - # check suggested bounds - f = pints.toy.HighDimensionalGaussianLogPDF(dimension=2) - bounds = f.suggested_bounds() - magnitude = 3 * np.sqrt(2.0) - bounds1 = np.tile([-magnitude, magnitude], (2, 1)) - bounds1 = np.transpose(bounds1).tolist() - self.assertTrue(np.array_equal(bounds, bounds1)) - - f = pints.toy.HighDimensionalGaussianLogPDF() - bounds = f.suggested_bounds() - self.assertTrue(bounds[0][0], np.sqrt(20) * 3.0) - # Test kl_divergence() errors n = 1000 d = f.n_parameters() diff --git a/pints/tests/test_toy_multimodal_gaussian_logpdf.py b/pints/tests/test_toy_multimodal_gaussian_logpdf.py index 0754cf34f4..c44f636a14 100755 --- a/pints/tests/test_toy_multimodal_gaussian_logpdf.py +++ b/pints/tests/test_toy_multimodal_gaussian_logpdf.py @@ -131,33 +131,6 @@ def test_sensitivities(self): self.assertAlmostEqual(dl[1], -0.054933536830093638) self.assertAlmostEqual(dl[2], -0.39317158556789844) - def test_suggested_bounds(self): - # Tests suggested_bounds(). - - f = pints.toy.MultimodalGaussianLogPDF() - covariances = [[[5**2, 0.5 * 5 * 3, -0.1 * 5 * 2], - [0.5 * 5 * 3, 3**2, 0.4 * 3 * 2], - [-0.1 * 5 * 2, 0.4 * 3 * 2, 2**2]], - [[5**2, 0.3 * 5 * 6, 0.2 * 5 * 7], - [0.3 * 5 * 6, 6**2, -0.3 * 6 * 7], - [0.2 * 5 * 7, -0.3 * 6 * 7, 7**2]]] - bounds = f.suggested_bounds() - lower = -10 - upper = 20 - bounds1 = np.tile([lower, upper], (2, 1)) - bounds1 = np.transpose(bounds1).tolist() - self.assertTrue(np.array_equal(bounds, bounds1)) - - f = pints.toy.MultimodalGaussianLogPDF( - modes=[[1, 2, 3], [3, 4, 5]], - covariances=covariances) - bounds = f.suggested_bounds() - lower = 1 - 4 - upper = 5 + 4 - bounds1 = np.tile([lower, upper], (3, 1)) - bounds1 = np.transpose(bounds1).tolist() - self.assertTrue(np.array_equal(bounds, bounds1)) - def test_distance_function(self): # Tests distance function which calls kl_divergence(). diff --git a/pints/tests/test_toy_neals_funnel_logpdf.py b/pints/tests/test_toy_neals_funnel_logpdf.py index 602f15a057..e742fc06c2 100755 --- a/pints/tests/test_toy_neals_funnel_logpdf.py +++ b/pints/tests/test_toy_neals_funnel_logpdf.py @@ -93,26 +93,6 @@ def test_bespoke(self): x = np.ones((n, d, 2)) self.assertRaises(ValueError, f.kl_divergence, x) - def test_suggested_bounds(self): - # Tests suggested_bounds(). - # default - f = pints.toy.NealsFunnelLogPDF() - bounds = f.suggested_bounds() - magnitude = 30 - bounds1 = np.tile([-magnitude, magnitude], - (f._n_parameters, 1)) - bounds1 = np.transpose(bounds1).tolist() - self.assertTrue(np.array_equal(bounds, bounds1)) - - # non-default - f = pints.toy.NealsFunnelLogPDF(20) - bounds = f.suggested_bounds() - magnitude = 30 - bounds1 = np.tile([-magnitude, magnitude], - (f._n_parameters, 1)) - bounds1 = np.transpose(bounds1).tolist() - self.assertTrue(np.array_equal(bounds, bounds1)) - if __name__ == '__main__': unittest.main() diff --git a/pints/tests/test_toy_rosenbrock.py b/pints/tests/test_toy_rosenbrock.py index 45833198c0..0beeaeb051 100755 --- a/pints/tests/test_toy_rosenbrock.py +++ b/pints/tests/test_toy_rosenbrock.py @@ -50,12 +50,7 @@ def test_log_pdf(self): self.assertEqual(dl[0], float(-6004.0 / 2505.0)) self.assertEqual(dl[1], float(200.0 / 501.0)) - # suggested bounds and distance measure - bounds = f.suggested_bounds() - bounds = [[-2, 4], [-1, 12]] - bounds = np.transpose(bounds).tolist() - self.assertTrue(np.array_equal(bounds, f.suggested_bounds())) - + # Distance measure x = np.ones((100, 3)) self.assertRaises(ValueError, f.distance, x) x = np.ones((100, 3, 2)) diff --git a/pints/tests/test_toy_simple_egg_box_logpdf.py b/pints/tests/test_toy_simple_egg_box_logpdf.py index 3b2cda235e..33612593df 100755 --- a/pints/tests/test_toy_simple_egg_box_logpdf.py +++ b/pints/tests/test_toy_simple_egg_box_logpdf.py @@ -70,9 +70,8 @@ def test_sampling_and_divergence(self): x = np.ones((n, 2, 2)) self.assertRaises(ValueError, log_pdf1.kl_divergence, x) - def test_sensitivity_bounds_distance(self): + def test_sensitivity_and_distance(self): # Tests :meth:`SimpleEggBoxLogPDF.evaluateS1()`, - # :meth:`SimpleEggBoxLogPDF.suggested_bounds()` and # :meth:`SimpleEggBoxLogPDF.distance()` f = pints.toy.SimpleEggBoxLogPDF() @@ -81,8 +80,6 @@ def test_sensitivity_bounds_distance(self): self.assertAlmostEqual(l, -13.781024134434123) self.assertAlmostEqual(dl[0], -1.5) self.assertAlmostEqual(dl[1], 2.9999991) - self.assertTrue(np.array_equal(f.suggested_bounds(), - [[-16.0, -16.0], [16.0, 16.0]])) samples = f.sample(100) self.assertTrue(f.kl_divergence(samples) > 0) self.assertEqual(f.kl_divergence(samples), f.distance(samples)) @@ -93,8 +90,6 @@ def test_sensitivity_bounds_distance(self): self.assertAlmostEqual(l, -46.269777289511559) self.assertAlmostEqual(dl[0], -4.6662126879796366) self.assertAlmostEqual(dl[1], -2.6666666666666639) - self.assertTrue(np.array_equal(f.suggested_bounds(), - [[-30.0, -30.0], [30.0, 30.0]])) samples = f.sample(100) self.assertTrue(f.kl_divergence(samples) > 0) self.assertEqual(f.kl_divergence(samples), f.distance(samples)) diff --git a/pints/tests/test_toy_twisted_gaussian_logpdf.py b/pints/tests/test_toy_twisted_gaussian_logpdf.py index 484110fdde..3bd6b2cdfc 100755 --- a/pints/tests/test_toy_twisted_gaussian_logpdf.py +++ b/pints/tests/test_toy_twisted_gaussian_logpdf.py @@ -84,13 +84,6 @@ def test_sampling_and_kl_divergence(self): x = np.ones((n, d, 2)) self.assertRaises(ValueError, log_pdf1.kl_divergence, x) - # Test suggested bounds - f = pints.toy.TwistedGaussianLogPDF() - bounds = f.suggested_bounds() - bounds1 = [[-50, 50], [-100, 100]] - bounds1 = np.transpose(bounds1).tolist() - self.assertTrue(np.array_equal(bounds, bounds1)) - def test_values_sensitivity(self): # Tests values of log pdf and sensitivities diff --git a/pints/toy/_annulus.py b/pints/toy/_annulus.py index ad53c1e3c8..8d9498305b 100644 --- a/pints/toy/_annulus.py +++ b/pints/toy/_annulus.py @@ -63,8 +63,7 @@ def __call__(self, x): def distance(self, samples): """ Calculates a measure of normed distance of samples from exact mean and - covariance matrix assuming uniform prior with bounds given by - :meth:`suggested_bounds`. + covariance matrix. See :meth:`ToyLogPDF.distance()`. """ @@ -174,16 +173,6 @@ def sigma(self): """ return self._sigma - def suggested_bounds(self): - """ See :meth:`ToyLogPDF.suggested_bounds()`. """ - # in higher dimensions reduce volume as otherwise gets too wide - r0_magnitude = (self._r0 + self._sigma) * ( - 5**(1.0 / (self._n_parameters - 1.0)) - ) - bounds = np.tile([-r0_magnitude, r0_magnitude], - (self._n_parameters, 1)) - return np.transpose(bounds).tolist() - def var_normed(self): """ Returns the variance of the normed distance from the origin. diff --git a/pints/toy/_cone.py b/pints/toy/_cone.py index e7d734c8a6..9bda087b8c 100644 --- a/pints/toy/_cone.py +++ b/pints/toy/_cone.py @@ -71,8 +71,7 @@ def CDF(self, x): def distance(self, samples): """ Calculates a measure of normed distance of samples from exact mean and - covariance matrix assuming uniform prior with bounds given by - :meth:`suggested_bounds()`. + covariance matrix. See :meth:`pints.toy.ToyLogPDF.distance()`. """ @@ -137,12 +136,6 @@ def sample(self, n_samples): x_unit = [r[i] * X_norm[i] / y for i, y in enumerate(lambda_x)] return np.array(x_unit) - def suggested_bounds(self): - """ See :meth:`ToyLogPDF.suggested_bounds()`. """ - magnitude = 1000 - bounds = np.tile([-magnitude, magnitude], (self._n_parameters, 1)) - return np.transpose(bounds).tolist() - def var_normed(self): """ Returns the variance of the normed distance from the origin. diff --git a/pints/toy/_eight_schools.py b/pints/toy/_eight_schools.py index 4d5f02e43c..75056487a1 100644 --- a/pints/toy/_eight_schools.py +++ b/pints/toy/_eight_schools.py @@ -156,9 +156,3 @@ def n_parameters(self): """ See :meth:`pints.LogPDF.n_parameters()`. """ return self._n_parameters - def suggested_bounds(self): - """ See :meth:`pints.toy.ToyLogPDF.suggested_bounds()`. """ - magnitude = 40 - bounds = np.tile([-magnitude, magnitude], (self.n_parameters(), 1)) - bounds[1, 0] = 0 - return np.transpose(bounds).tolist() diff --git a/pints/toy/_german_credit.py b/pints/toy/_german_credit.py index 50b6d9a442..f162e74380 100644 --- a/pints/toy/_german_credit.py +++ b/pints/toy/_german_credit.py @@ -121,8 +121,3 @@ def evaluateS1(self, beta): def n_parameters(self): return self._n_parameters - def suggested_bounds(self): - """ See :meth:`ToyLogPDF.suggested_bounds()`. """ - magnitude = 100 - bounds = np.tile([-magnitude, magnitude], (self._n_parameters, 1)) - return np.transpose(bounds).tolist() diff --git a/pints/toy/_german_credit_hierarchical.py b/pints/toy/_german_credit_hierarchical.py index f6bc71b79a..f1da1abf0d 100644 --- a/pints/toy/_german_credit_hierarchical.py +++ b/pints/toy/_german_credit_hierarchical.py @@ -153,8 +153,3 @@ def evaluateS1(self, theta): def n_parameters(self): return self._n_parameters - def suggested_bounds(self): - """ See :meth:`ToyLogPDF.suggested_bounds()`. """ - magnitude = 100 - bounds = np.tile([-magnitude, magnitude], (self._n_parameters, 1)) - return np.transpose(bounds).tolist() diff --git a/pints/toy/_high_dimensional_gaussian.py b/pints/toy/_high_dimensional_gaussian.py index 85d604b1e5..70d169d94c 100644 --- a/pints/toy/_high_dimensional_gaussian.py +++ b/pints/toy/_high_dimensional_gaussian.py @@ -146,10 +146,3 @@ def sample(self, n_samples): 'Number of samples must be greater than or equal to 1.') return self._var.rvs(n_samples) - def suggested_bounds(self): - """ See :meth:`pints.toy.ToyLogPDF.suggested_bounds()`. """ - # maximum variance in one dimension is n_parameters, so use - # 3 times sqrt of this as prior bounds - magnitude = 3 * np.sqrt(self.n_parameters()) - bounds = np.tile([-magnitude, magnitude], (self.n_parameters(), 1)) - return np.transpose(bounds).tolist() diff --git a/pints/toy/_multimodal_gaussian.py b/pints/toy/_multimodal_gaussian.py index c397379fe9..66e7c28af9 100644 --- a/pints/toy/_multimodal_gaussian.py +++ b/pints/toy/_multimodal_gaussian.py @@ -201,13 +201,3 @@ def sample(self, n_samples): samples[i, :] = self._vars[rand_mode].rvs(1) return samples - def suggested_bounds(self): - """ See :meth:`pints.toy.ToyLogPDF.suggested_bounds()`. """ - # make rectangular bounds in each dimension 3X width of range - a_max = np.max(self._modes) - a_min = np.min(self._modes) - a_range = a_max - a_min - lower = a_min - a_range - upper = a_max + a_range - bounds = np.tile([lower, upper], (self._n_parameters, 1)) - return np.transpose(bounds).tolist() diff --git a/pints/toy/_neals_funnel.py b/pints/toy/_neals_funnel.py index 3a30f9799d..2d8e989c28 100644 --- a/pints/toy/_neals_funnel.py +++ b/pints/toy/_neals_funnel.py @@ -126,13 +126,6 @@ def sample(self, n_samples): samples[i, n - 1] = nu return samples - def suggested_bounds(self): - """ See :meth:`pints.toy.ToyLogPDF.suggested_bounds()`. """ - magnitude = 30 - bounds = np.tile([-magnitude, magnitude], - (self._n_parameters, 1)) - return np.transpose(bounds).tolist() - def var(self): """ Returns the variance of the target distribution in each dimension. diff --git a/pints/toy/_rosenbrock.py b/pints/toy/_rosenbrock.py index 824432d30c..3338e9f091 100644 --- a/pints/toy/_rosenbrock.py +++ b/pints/toy/_rosenbrock.py @@ -59,7 +59,6 @@ class RosenbrockLogPDF(ToyLogPDF): def __init__(self): self._f = RosenbrockError() - # assumes uniform prior with bounds given by suggested_bounds self._true_mean = np.array([0.8693578490590254, 2.599780856590108]) self._true_cov = np.array([[1.805379677045191, 2.702575590274159], [2.702575590274159, 8.526583078612177]]) @@ -70,8 +69,7 @@ def __call__(self, x): def distance(self, samples): """ Calculates a measure of normed distance of samples from exact mean and - covariance matrix assuming uniform prior with bounds given - by :meth:`suggested_bounds()`. + covariance matrix. See :meth:`pints.toy.ToyLogPDF.distance()`. """ @@ -118,8 +116,3 @@ def optimum(self): """ return self._f.optimum() - def suggested_bounds(self): - """ See :meth:`pints.toy.ToyLogPDF.suggested_bounds()`. """ - # think the following hard bounds are ok - bounds = [[-2, 4], [-1, 12]] - return np.transpose(bounds).tolist() diff --git a/pints/toy/_simple_egg_box.py b/pints/toy/_simple_egg_box.py index 8a70c79780..c2baa6d897 100644 --- a/pints/toy/_simple_egg_box.py +++ b/pints/toy/_simple_egg_box.py @@ -157,8 +157,3 @@ def sample(self, n): np.random.shuffle(x) return x - def suggested_bounds(self): - """ See :meth:`ToyLogPDF.suggested_bounds()`. """ - magnitude = self._r * self._sigma * 2 - bounds = np.tile([-magnitude, magnitude], (2, 1)) - return np.transpose(bounds).tolist() diff --git a/pints/toy/_toy_classes.py b/pints/toy/_toy_classes.py index bb84319280..f03f8b1d97 100644 --- a/pints/toy/_toy_classes.py +++ b/pints/toy/_toy_classes.py @@ -30,12 +30,6 @@ def sample(self, n_samples): """ raise NotImplementedError - def suggested_bounds(self): - """ - Returns suggested boundaries for prior. - """ - raise NotImplementedError - class ToyModel(): """ diff --git a/pints/toy/_twisted_gaussian_banana.py b/pints/toy/_twisted_gaussian_banana.py index 456530c7a1..c6f86104f8 100644 --- a/pints/toy/_twisted_gaussian_banana.py +++ b/pints/toy/_twisted_gaussian_banana.py @@ -153,12 +153,6 @@ def sample(self, n): x[:, 1] -= self._b * (x[:, 0] ** 2 - self._V) return x - def suggested_bounds(self): - """ See :meth:`pints.toy.ToyLogPDF.suggested_bounds()`. """ - # based on independent sampling think the following hard bounds are ok - bounds = [[-50, 50], [-100, 100]] - return np.transpose(bounds).tolist() - def untwist(self, samples): """ De-transforms (or "untwists") a list of ``samples`` from the twisted From 4ed2f41d5b38ce7ad88ea3d99cd222bf1c69f548 Mon Sep 17 00:00:00 2001 From: Michael Clerx Date: Fri, 6 Feb 2026 13:47:14 +0000 Subject: [PATCH 2/3] Updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aea4ad005a..86d8b6f27f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ All notable changes to this project will be documented in this file. - [#1724](https://github.com/pints-team/pints/pull/1724) The classes `PooledLogPDF` and `SumOfIndependentLogPDFs` are deprecated, in favour of `PooledLogLikelihood` and `SumOfIndependentLogLikelihoods` respectively. - [#1508](https://github.com/pints-team/pints/pull/1508) The methods `OptimisationController.max_unchanged_iterations` and `set_max_unchanged_iterations` are deprecated, in favour of `function_tolerance` and `set_function_tolerance` respectively. ### Removed +- [#1731](https://github.com/pints-team/pints/pull/1731) The method `ToyLogPDF.suggested_bounds()` and its implementations have been removed. ### Fixed - [#1713](https://github.com/pints-team/pints/pull/1713) Fixed Numpy 2.4.1 compatibility issues. - [#1690](https://github.com/pints-team/pints/pull/1690) Fixed bug in optimisation controller if population size left at `None`. From 7d8ce1ca28a6f4d28d6a6361445f5119e730203a Mon Sep 17 00:00:00 2001 From: Michael Clerx Date: Fri, 6 Feb 2026 14:15:08 +0000 Subject: [PATCH 3/3] Added missing test --- pints/tests/test_toy_eight_schools_logpdf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pints/tests/test_toy_eight_schools_logpdf.py b/pints/tests/test_toy_eight_schools_logpdf.py index 69b1696949..f9249172f8 100755 --- a/pints/tests/test_toy_eight_schools_logpdf.py +++ b/pints/tests/test_toy_eight_schools_logpdf.py @@ -21,6 +21,7 @@ def test_basic(self): # Default settings f = pints.toy.EightSchoolsLogPDF() + self.assertEqual(f.n_parameters(), 10) f1, dp = f.evaluateS1(np.ones(10)) self.assertEqual(f1, f(np.ones(10))) self.assertAlmostEqual(f1, -43.02226038161451)