Reputation: 3298
How can I view/print to screen a small RowMatrix
in Scala?
val A = new RowMatrix(sparkContext.parallelize(Seq(
Vectors.dense(1, 2, 3),
Vectors.dense(4, 5, 6))))
Upvotes: 2
Views: 1176
Reputation: 3298
I figured it's just
A.rows.collect
FYI: Beware of the matrix size.
Upvotes: 1