10000 COSMIT Use `get_namespace_and_device` in `multilabel_confusion_matrix… · jeremiedbb/scikit-learn@37bbeaa · GitHub
[go: up one dir, main page]

Skip to content

Commit 37bbeaa

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

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

sklearn/metrics/_classification.py

Lines changed: 1 addition & 3 deletions
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