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 8cacc89 commit 1ed5568Copy full SHA for 1ed5568
sklearn/metrics/_ranking.py
@@ -380,8 +380,8 @@ def det_curve(
380
381
# add a threshold at inf where the clf always predicts the negative class
382
# i.e. tps = fps = 0
383
- tps = xp.concat((xp.asarray([0], device=device), tps))
384
- fps = xp.concat((xp.asarray([0], device=device), fps))
+ tps = xp.concat((xp.asarray([0.0], device=device), tps))
+ fps = xp.concat((xp.asarray([0.0], device=device), fps))
385
thresholds = xp.concat((xp.asarray([np.inf], device=device), thresholds))
386
387
if drop_intermediate and len(fps) > 2:
0 commit comments