Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4109#discussion_r23319701
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/linalg/Matrices.scala 
---
    @@ -114,21 +106,47 @@ class DenseMatrix(val numRows: Int, val numCols: Int, 
val values: Array[Double])
       require(values.length == numRows * numCols, "The number of values 
supplied doesn't match the " +
         s"size of the matrix! values.length: ${values.length}, numRows * 
numCols: ${numRows * numCols}")
     
    -  override def toArray: Array[Double] = values
    +  override def toArray: Array[Double] = {
    --- End diff --
    
    No, the matrix is used in RDDs. It will be error-prone if we change the 
underlying data. Just want to make sure that in existing code when we call 
`values`, we check `isTransposed`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to