Charlie Evans created SPARK-15922: ------------------------------------- Summary: BlockMatrix to IndexedRowMatrix throws an error Key: SPARK-15922 URL: https://issues.apache.org/jira/browse/SPARK-15922 Project: Spark Issue Type: Bug Components: MLlib Affects Versions: 2.0.0 Reporter: Charlie Evans
import org.apache.spark.mllib.linalg.distributed._ import org.apache.spark.mllib.linalg._ val rows = IndexedRow(0L, new DenseVector(Array(1,2,3))) :: IndexedRow(1L, new DenseVector(Array(1,2,3))):: IndexedRow(2L, new DenseVector(Array(1,2,3))):: Nil val rdd = sc.parallelize(rows) val matrix = new IndexedRowMatrix(rdd, 3, 3) val bmat = matrix.toBlockMatrix val imat = bmat.toIndexedRowMatrix imat.rows.collect // this throws an error - Caused by: java.lang.IllegalArgumentException: requirement failed: Vectors must be the same length! -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org