[ 
https://issues.apache.org/jira/browse/SPARK-6150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14346280#comment-14346280
 ] 

Apache Spark commented on SPARK-6150:
-------------------------------------

User 'yu-iskw' has created a pull request for this issue:
https://github.com/apache/spark/pull/4883

> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to