You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yu Ishikawa (JIRA)" <ji...@apache.org> on 2015/03/04 03:20:04 UTC

[jira] [Created] (SPARK-6150) Validate indices before constructing a SparseVector

Yu Ishikawa created SPARK-6150:
----------------------------------

             Summary: Validate indices before constructing a SparseVector
                 Key: SPARK-6150
                 URL: https://issues.apache.org/jira/browse/SPARK-6150
             Project: Spark
          Issue Type: Bug
          Components: MLlib
            Reporter: Yu Ishikawa
            Priority: Minor


We can set the invalid indices when constructing a SparseVector. We should validate the indices before the construction.

It should be invalid, but we can make a SparseVector with below. It is not until we access the value with the index that an exception is raised.

{code}
Vectors.sparse(4, Array(100), Array(1.0))
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org