Skip to content

Navigation Menu

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 37bbeaa

Browse filesBrowse files
authored
COSMIT Use get_namespace_and_device in multilabel_confusion_matrix (scikit-learn#31287)
1 parent 2d66fd7 commit 37bbeaa
Copy full SHA for 37bbeaa

File tree

1 file changed

+1
-3
lines changed
Filter options

1 file changed

+1
-3
lines changed

‎sklearn/metrics/_classification.py

Copy file name to clipboardExpand all lines: sklearn/metrics/_classification.py
+1-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
_searchsorted,
3737
_tolist,
3838
_union1d,
39-
device,
4039
get_namespace,
4140
get_namespace_and_device,
4241
xpx,
@@ -655,8 +654,7 @@ def multilabel_confusion_matrix(
655654
[1, 2]]])
656655
"""
657656
y_true, y_pred = attach_unique(y_true, y_pred)
658-
xp, _ = get_namespace(y_true, y_pred)
659-
device_ = device(y_true, y_pred)
657+
xp, _, device_ = get_namespace_and_device(y_true, y_pred)
660658
y_type, y_true, y_pred = _check_targets(y_true, y_pred)
661659
if sample_weight is not None:
662660
sample_weight = column_or_1d(sample_weight, device=device_)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.