spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-20615) SparseVector.argmax throws IndexOutOfBoundsException when the sparse vector has a size greater than zero but no elements defined.
Date Fri, 05 May 2017 21:22:04 GMT

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

Apache Spark commented on SPARK-20615:
--------------------------------------

User 'jonmclean' has created a pull request for this issue:
https://github.com/apache/spark/pull/17877

> SparseVector.argmax throws IndexOutOfBoundsException when the sparse vector has a size
greater than zero but no elements defined.
> ---------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-20615
>                 URL: https://issues.apache.org/jira/browse/SPARK-20615
>             Project: Spark
>          Issue Type: Bug
>          Components: ML, MLlib
>    Affects Versions: 2.1.0
>            Reporter: Jon McLean
>            Priority: Minor
>
> org.apache.spark.ml.linalg.SparseVector.argmax throws an IndexOutOfRangeException when
the vector size is greater than zero and no values are defined.  The toString() representation
of such a vector is " (100000,[],[])".  This is because the argmax function tries to get the
value at indexes(0) without checking the size of the array.
> Code inspection reveals that the mllib version of SparseVector should have the same issue.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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


Mime
View raw message