diff --git a/sklearn/cluster/tests/test_mean_shift.py b/sklearn/cluster/tests/test_mean_shift.py index 6ea5cb8bda1d3..c61188a297e8e 100644 --- a/sklearn/cluster/tests/test_mean_shift.py +++ b/sklearn/cluster/tests/test_mean_shift.py @@ -36,7 +36,7 @@ def test_estimate_bandwidth_1sample(): # Test estimate_bandwidth when n_samples=1 and quantile<1, so that # n_neighbors is set to 1. bandwidth = estimate_bandwidth(X, n_samples=1, quantile=0.3) - assert bandwidth == 0. + assert bandwidth == pytest.approx(0., abs=1e-5) @pytest.mark.parametrize("bandwidth, cluster_all, expected, "