Skip to content

Commit 02b59de

Browse files
committed
COSMIT: rng.permutation rather than rng.shuffle
1 parent 6945d5b commit 02b59de

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sklearn/cluster/dbscan_.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ def dbscan(X, eps=0.5, min_samples=5, metric='minkowski',
8787

8888
# If index order not given, create random order.
8989
random_state = check_random_state(random_state)
90-
index_order = np.arange(n)
91-
random_state.shuffle(index_order)
90+
index_order = random_state.permutation(n)
9291

9392
# check for known metric powers
9493
distance_matrix = True

0 commit comments

Comments
 (0)