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 ec29bd7

Browse filesBrowse files
ogriseljeremiedbb
authored andcommitted
FIX missing force_writeable in KernelCenterer.transform (scikit-learn#29328)
1 parent 7d80f6b commit ec29bd7
Copy full SHA for ec29bd7

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Filter options
Expand file treeCollapse file tree

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
@@ -2445,7 +2445,11 @@ def transform(self, K, copy=True):
24452445
xp, _ = get_namespace(K)
24462446

24472447
K = self._validate_data(
2448-
K, copy=copy, dtype=_array_api.supported_float_dtypes(xp), reset=False
2448+
K,
2449+
copy=copy,
2450+
force_writeable=True,
2451+
dtype=_array_api.supported_float_dtypes(xp),
2452+
reset=False,
24492453
)
24502454

24512455
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.