[jira] [Commented] (SPARK-20615) SparseVector.argmax throws IndexOutOfBoundsException when the sparse vector has a size greater than zero but no elements defined.

2017-05-05 Thread Apache Spark (JIRA)
[ https://issues.apache.org/jira/browse/SPARK-20615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15998970#comment-15998970 ] Apache Spark commented on SPARK-20615: -- User 'jonmclean' has created a pull request for this issue:

[jira] [Commented] (SPARK-20615) SparseVector.argmax throws IndexOutOfBoundsException when the sparse vector has a size greater than zero but no elements defined.

2017-05-05 Thread Jon McLean (JIRA)
[ https://issues.apache.org/jira/browse/SPARK-20615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15998460#comment-15998460 ] Jon McLean commented on SPARK-20615: Thank you. I will submit a patch with tests. >

[jira] [Commented] (SPARK-20615) SparseVector.argmax throws IndexOutOfBoundsException when the sparse vector has a size greater than zero but no elements defined.

2017-05-05 Thread Sean Owen (JIRA)
[ https://issues.apache.org/jira/browse/SPARK-20615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15998459#comment-15998459 ] Sean Owen commented on SPARK-20615: --- Agree, I think you just want to return 0 if numActives == 0 early