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

    https://github.com/apache/spark/pull/4433#discussion_r24289433
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/linalg/EigenValueDecomposition.scala
 ---
    @@ -79,6 +79,11 @@ private[mllib] object EigenValueDecomposition {
         // Mode 1: A*x = lambda*x, A symmetric
         iparam(6) = 1
     
    +    require(n * ncv.toLong <= Integer.MAX_VALUE, "Large n and/or k will 
exceed " +
    --- End diff --
    
    I don't mean to belabor this, but the new second error message implies that 
k alone is the problem, and that k exceeds 2^31-1, and those aren't necessarily 
true. Concretely I'm suggesting something simple like
    
    ```
    require(n * ncv.toLong <= Integer.MAX_VALUE && ncv * (ncv.toLong + 8) <= 
Integer.MAX_VALUE, 
            s"k = $k and/or n = $n are too large to compute an 
eigendecomposition")
    ```


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