From 1224ccabf10294e0eecf8cae8af50b6128d9681a Mon Sep 17 00:00:00 2001 From: Roman Yurchak Date: Tue, 25 Jun 2019 22:05:42 +0200 Subject: [PATCH] Fix atol in test_estimate_bandwidth_1sample --- sklearn/cluster/tests/test_mean_shift.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, "