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 a2e37eb commit 42b2995Copy full SHA for 42b2995
sklearn/cluster/tests/test_k_means.py
@@ -325,13 +325,13 @@ def test_minibatch_reassign():
325
for this_X in (X, X_csr):
326
mb_k_means = MiniBatchKMeans(n_clusters=n_clusters, batch_size=1,
327
random_state=42)
328
- mb_k_means.fit(X)
+ mb_k_means.fit(this_X)
329
centers_before = mb_k_means.cluster_centers_.copy()
330
try:
331
old_stdout = sys.stdout
332
sys.stdout = StringIO()
333
# Turn on verbosity to smoke test the display code
334
- _mini_batch_step(X, (X ** 2).sum(axis=1),
+ _mini_batch_step(this_X, (X ** 2).sum(axis=1),
335
mb_k_means.cluster_centers_,
336
mb_k_means.counts_, np.zeros(X.shape[1], np.double),
337
False, random_reassign=True, random_state=42,
0 commit comments