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 4310710 commit 79d9c11Copy full SHA for 79d9c11
mllib/src/main/scala/org/apache/spark/mllib/util/MLUtils.scala
@@ -86,10 +86,11 @@ object MLUtils {
86
// check if indices are one-based and in ascending order
87
var previous = -1
88
var i = 0
89
- val indicesLength = indices.size
+ val indicesLength = indices.length
90
while (i < indicesLength) {
91
- require(indices(i) > previous, "indices should be one-based and in ascending order" )
92
- previous = indices(i)
+ val current = indices(i)
+ require(current > previous, "indices should be one-based and in ascending order" )
93
+ previous = current
94
i += 1
95
}
96
0 commit comments