Skip to content

Commit 4af1831

Browse files
betatimogrisel
andauthored
CI Fix uninitialised memory at exactly x=0.35 (scikit-learn#34373)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
1 parent c8f2a90 commit 4af1831

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sklearn/gaussian_process/tests/test_gpc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ def f(x):
3636
X2 = np.atleast_2d([2.0, 4.0, 5.5, 6.5, 7.5]).T
3737
y = np.array(f(X).ravel() > 0, dtype=int)
3838
fX = f(X).ravel()
39-
y_mc = np.empty(y.shape, dtype=int) # multi-class
39+
y_mc = np.zeros(y.shape, dtype=int) # multi-class
4040
y_mc[fX < -0.35] = 0
4141
y_mc[(fX >= -0.35) & (fX < 0.35)] = 1
42-
y_mc[fX > 0.35] = 2
42+
y_mc[fX >= 0.35] = 2
4343

4444

4545
fixed_kernel = RBF(length_scale=1.0, length_scale_bounds="fixed")

0 commit comments

Comments
 (0)