Skip to content

Commit

Permalink
fix a silly bug in maxK
Browse files Browse the repository at this point in the history
  • Loading branch information
guolinke committed Dec 11, 2017
1 parent 24177dc commit 0481762
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/LightGBM/utils/array_args.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class ArrayArgs {
if ((k > l && k < r) || l == 0 || r == end - 1) {
return k;
} else if (k <= l) {
return ArgMaxAtK(arr, start, l, k);
return ArgMaxAtK(arr, start, l + 1, k);
} else {
return ArgMaxAtK(arr, r, end, k);
}
Expand Down

0 comments on commit 0481762

Please sign in to comment.