Skip to content

Commit 90b8f12

Browse files
committed
fix
1 parent 1ed5568 commit 90b8f12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/metrics/_ranking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ def det_curve(
404404
tps = tps[optimal_idxs]
405405
thresholds = thresholds[optimal_idxs]
406406

407-
if len(xp.unique(y_true)) != 2:
407+
if len(xp.unique_values(y_true)) != 2:
408408
raise ValueError(
409409
"Only one class is present in y_true. Detection error "
410410
"tradeoff curve is not defined in that case."

0 commit comments

Comments
 (0)