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

    https://github.com/apache/spark/pull/14824#discussion_r76417535
  
    --- Diff: 
mllib-local/src/main/scala/org/apache/spark/ml/linalg/Matrices.scala ---
    @@ -455,9 +455,11 @@ class SparseMatrix @Since("2.0.0") (
       require(values.length == rowIndices.length, "The number of row indices 
and values don't match! " +
         s"values.length: ${values.length}, rowIndices.length: 
${rowIndices.length}")
       // The Or statement is for the case when the matrix is transposed
    -  require(colPtrs.length == numCols + 1 || colPtrs.length == numRows + 1, 
"The length of the " +
    -    "column indices should be the number of columns + 1. Currently, 
colPointers.length: " +
    -    s"${colPtrs.length}, numCols: $numCols")
    +  require(!isTransposed && colPtrs.length == numCols + 1 ||
    --- End diff --
    
    Thanks @srowen , code is updated.


---
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