Skip to content

Commit

Permalink
Use get, instead of apply
Browse files Browse the repository at this point in the history
  • Loading branch information
yu-iskw committed Jul 16, 2015
1 parent 288e8d5 commit 6566c8b
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ class KMeansSuite extends SparkFunSuite with MLlibTestSparkContext {
transformed.columns.foreach { column =>
Array("features", predictionColName).contains(column)
}
val clusters = transformed.select(predictionColName)
.map(row => row.apply(0)).distinct().collect().toSet
val clusters = transformed.select(predictionColName).map(_.get(0)).distinct().collect().toSet
assert(clusters.size === k)
assert(clusters === Set(0, 1, 2, 3, 4))
}
Expand Down

0 comments on commit 6566c8b

Please sign in to comment.