We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ed5568 commit 90b8f12Copy full SHA for 90b8f12
sklearn/metrics/_ranking.py
@@ -404,7 +404,7 @@ def det_curve(
404
tps = tps[optimal_idxs]
405
thresholds = thresholds[optimal_idxs]
406
407
- if len(xp.unique(y_true)) != 2:
+ if len(xp.unique_values(y_true)) != 2:
408
raise ValueError(
409
"Only one class is present in y_true. Detection error "
410
"tradeoff curve is not defined in that case."
0 commit comments