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

    https://github.com/apache/spark/pull/15628#discussion_r107519619
  
    --- Diff: 
mllib-local/src/main/scala/org/apache/spark/ml/linalg/Matrices.scala ---
    @@ -161,6 +162,109 @@ sealed trait Matrix extends Serializable {
        */
       @Since("2.0.0")
       def numActives: Int
    +
    +  /**
    +   * Converts this matrix to a sparse matrix.
    +   *
    +   * @param colMajor Whether the values of the resulting sparse matrix 
should be in column major
    +   *                    or row major order. If `false`, resulting matrix 
will be row major.
    +   */
    +  private[ml] def toSparseMatrix(colMajor: Boolean): SparseMatrix
    +
    +  /**
    +   * Converts this matrix to a sparse matrix in column major order.
    +   */
    +  @Since("2.2.0")
    +  def toCSC: SparseMatrix = toSparseMatrix(colMajor = true)
    --- End diff --
    
    After thinking about it again, let's have it as `toSparseColumnMajor` to 
make the apis consistent with the dense ones if you don't mind?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to