10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5af75b9 commit 625650fCopy full SHA for 625650f
sklearn/cluster/tests/test_dbscan.py
@@ -286,7 +286,7 @@ def test_boundaries():
286
assert 0 not in core
287
288
289
-def test_weighted_dbscan():
+def test_weighted_dbscan(global_random_seed):
290
# ensure sample_weight is validated
291
with pytest.raises(ValueError):
292
dbscan([[0], [1]], sample_weight=[2])
@@ -320,7 +320,7 @@ def test_weighted_dbscan():
320
)
321
322
# for non-negative sample_weight, cores should be identical to repetition
323
- rng = np.random.RandomState(42)
+ rng = np.random.RandomState(global_random_seed)
324
sample_weight = rng.randint(0, 5, X.shape[0])
325
core1, label1 = dbscan(X, sample_weight=sample_weight)
326
assert len(label1) == len(X)
0 commit comments