8000 DOC Update plot_color_quantization.py (#11750) · scikit-learn/scikit-learn@e79fe95 · GitHub
[go: up one dir, main page]

Skip to content

Commit e79fe95

Browse files
nlw0jnothman
authored andcommitted
DOC Update plot_color_quantization.py (#11750)
Make random color actually select n_colors
1 parent 477c921 commit e79fe95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/cluster/plot_color_quantization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
print("done in %0.3fs." % (time() - t0))
6262

6363

64-
codebook_random = shuffle(image_array, random_state=0)[:n_colors + 1]
64+
codebook_random = shuffle(image_array, random_state=0)[:n_colors]
6565
print("Predicting color indices on the full image (random)")
6666
t0 = time()
6767
labels_random = pairwise_distances_argmin(codebook_random,

0 commit comments

Comments
 (0)
0