8000 FIX missing force_writeable in KernelCenterer.transform (#29328) · scikit-learn/scikit-learn@a490ab1 · GitHub
[go: up one dir, main page]

Skip to content

Commit a490ab1

Browse files
authored
FIX missing force_writeable in KernelCenterer.transform (#29328)
1 parent ef6efef commit a490ab1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sklearn/preprocessing/_data.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2435,7 +2435,11 @@ def transform(self, K, copy=True):
24352435
xp, _ = get_namespace(K)
24362436

24372437
K = self._validate_data(
2438-
K, copy=copy, dtype=_array_api.supported_float_dtypes(xp), reset=False
2438+
K,
2439+
copy=copy,
2440+
force_writeable=True,
2441+
dtype=_array_api.supported_float_dtypes(xp),
2442+
reset=False,
24392443
)
24402444

24412445
K_pred_cols = (xp.sum(K, axis=1) / self.K_fit_rows_.shape[0])[:, None]

0 commit comments

Comments
 (0)
0