Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a490ab1

Browse filesBrowse files
authored
FIX missing force_writeable in KernelCenterer.transform (#29328)
1 parent ef6efef commit a490ab1
Copy full SHA for a490ab1

File tree

1 file changed

+5
-1
lines changed
Filter options

1 file changed

+5
-1
lines changed

‎sklearn/preprocessing/_data.py

Copy file name to clipboardExpand all lines: sklearn/preprocessing/_data.py
+5-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.