Skip to content

Commit 6b4675b

Browse files
authored
Add seeds to all datasets
1 parent d63578a commit 6b4675b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hdbscan/tests/test_hdbscan.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ def run_test(*args, **kwargs):
118118

119119
def generate_noisy_data():
120120
blobs, _ = datasets.make_blobs(
121-
n_samples=200, centers=[(-0.75, 2.25), (1.0, 2.0)], cluster_std=0.25
121+
n_samples=200, centers=[(-0.75, 2.25), (1.0, 2.0)], cluster_std=0.25, random_state=42
122122
)
123-
moons, _ = datasets.make_moons(n_samples=200, noise=0.05)
123+
moons, _ = datasets.make_moons(n_samples=200, noise=0.05, random_state=42)
124124
rng = np.random.default_rng(seed=42)
125125
noise = rng.uniform(-1.0, 3.0, (50, 2))
126-
126+
127127
return np.vstack([blobs, moons, noise])
128128

129129

0 commit comments

Comments
 (0)