@@ -98,7 +98,7 @@ def test_extract_xi():
98
98
X , expected_labels = shuffle (X , expected_labels , random_state = rng )
99
99
100
100
clust = OPTICS (min_samples = 3 , min_cluster_size = 2 ,
101
- max_eps = np . inf , cluster_method = 'xi' ,
101
+ max_eps = 20 , cluster_method = 'xi' ,
102
102
xi = 0.4 ).fit (X )
103
103
assert_array_equal (clust .labels_ , expected_labels )
104
104
@@ -110,7 +110,7 @@ def test_extract_xi():
110
110
pytest .skip ('FIXME (#13739): This is not stable across platforms.' )
111
111
112
112
clust = OPTICS (min_samples = 3 , min_cluster_size = 3 ,
113
- max_eps = np . inf , cluster_method = 'xi' ,
113
+ max_eps = 20 , cluster_method = 'xi' ,
114
114
xi = 0.1 ).fit (X )
115
115
# this may fail if the predecessor correction is not at work!
116
116
assert_array_equal (clust .labels_ , expected_labels )
@@ -129,9 +129,10 @@ def test_extract_xi():
129
129
130
130
131
131
def test_cluster_hierarchy_ ():
132
+ rng = np .random .RandomState (0 )
132
133
n_points_per_cluster = 100
133
134
C1 = [0 , 0 ] + 2 * rng .randn (n_points_per_cluster , 2 )
134
- C2 = [0 , 0 ] + 10 * rng .randn (n_points_per_cluster , 2 )
135
+ C2 = [0 , 0 ] + 50 * rng .randn (n_points_per_cluster , 2 )
135
136
X = np .vstack ((C1 , C2 ))
136
137
X = shuffle (X , random_state = 0 )
137
138
0 commit comments