8000 Handle comments · lesteve/scikit-learn@3af1470 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3af1470

Browse files
committed
Handle comments
1 parent 72cd185 commit 3af1470

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

sklearn/mixture/_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ def _initialize_parameters(self, X, random_state, xp=None):
142142
# TODO: when array API supports __setitem__ with fancy indexing we
143143
# can use the previous code:
144144
# resp[indices, xp.arange(self.n_components)] = 1
145-
# Until we use a for loop one on dimension.
146-
for count, index in enumerate(indices):
147-
resp[index, count] = 1
145+
# Until then we use a for loop on one dimension.
146+
for col, index in enumerate(indices):
147+
resp[index, col] = 1
148148
elif self.init_params == "k-means++":
149149
resp = np.zeros((n_samples, self.n_components), dtype=X.dtype)
150150
_, indices = kmeans_plusplus(

sklearn/utils/tests/test_array_api.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,6 @@ def test_logsumexp_like_scipy_logsumexp(array_namespace, device_, dtype_name, ax
662662

663663
# if torch on CPU or array api strict on default device
664664
# check that _logsumexp works when array API dispatch is disabled
665-
# TODO is there a better way for this
666665
if (array_namespace == "torch" and device_ == "cpu") or (
667666
array_namespace == "array_api_strict" and "CPU" in str(device_)
668667
):

0 commit comments

Comments
 (0)
0