Skip to content

Commit f339609

Browse files
jnothmanrth
authored andcommitted
TST attempt to fix the variance threshold part of scikit-learn#14192 (scikit-learn#14204)
1 parent d360ffa commit f339609

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sklearn/feature_selection/tests/test_variance_threshold.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ def test_zero_variance_floating_point_error():
3838
# See #13691
3939

4040
data = [[-0.13725701]] * 10
41-
assert np.var(data) != 0
41+
if np.var(data) == 0:
42+
pytest.skip('This test is not valid for this platform, as it relies '
43+
'on numerical instabilities.')
4244
for X in [data, csr_matrix(data), csc_matrix(data), bsr_matrix(data)]:
4345
msg = "No feature in X meets the variance threshold 0.00000"
4446
with pytest.raises(ValueError, match=msg):

0 commit comments

Comments
 (0)