Skip to content

Commit 63cac2c

Browse files
committed
typo
1 parent 90b8f12 commit 63cac2c

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_values(y_true)) != 2:
407+
if xp.unique_values(y_true).shape[0] != 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)