Skip to content

Commit e4561c6

Browse files
committed
Fix tests HSGP
1 parent 24a9e54 commit e4561c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/gp/test_hsgp_approx.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def test_set_boundaries_3d(self, X2):
123123

124124
def test_mean_invariance(self):
125125
X = np.linspace(0, 10, 100)[:, None]
126-
original_mean = np.mean(X, axis=0)
126+
original_center = (np.max(X, axis=0) - np.min(X, axis=0)) / 2
127127

128128
with pm.Model() as model:
129129
_ = pm.Data("X", X)
@@ -136,8 +136,8 @@ def test_mean_invariance(self):
136136
pm.set_data({"X": x_new})
137137

138138
assert np.allclose(
139-
gp._X_mean, original_mean
140-
), "gp._X_mean should not change after updating data for out-of-sample predictions."
139+
gp._X_center, original_center
140+
), "gp._X_center should not change after updating data for out-of-sample predictions."
141141

142142
def test_parametrization(self):
143143
err_msg = (

0 commit comments

Comments
 (0)