From d2bbdca8392b75790f9163dd1e88f593d07837e7 Mon Sep 17 00:00:00 2001 From: Pierre-Francois Leget Date: Wed, 13 Nov 2024 07:56:01 -0800 Subject: [PATCH] Fix seed placement in GP unit tests. --- tests/test_gp_interp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_gp_interp.py b/tests/test_gp_interp.py index 5bd5c820..17f13dac 100644 --- a/tests/test_gp_interp.py +++ b/tests/test_gp_interp.py @@ -69,6 +69,8 @@ def setUp(self): self.correlation_length = 10.0 self.white_noise = 1e-5 + np.random.seed(42) + x1 = np.random.uniform(0, 99, npoints) x2 = np.random.uniform(0, 120, npoints) coord1 = np.array([x1, x2]).T @@ -80,7 +82,6 @@ def setUp(self): # on a 100 * 100 is to slow. So generate 1e3 points # and then interpolate it with a GP to do data augmentation. - np.random.seed(42) z1 = np.random.multivariate_normal(np.zeros(npoints), kernel) x1 = np.linspace(0, 99, 100)