[
https://issues.apache.org/jira/browse/SPARK-11531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Urvish Parikh updated SPARK-11531:
----------------------------------
Description:
Currently when there are duplicate indices in the SparseVector it will return
an error message "indices array must be sorted"
From:
https://github.com/apache/spark/blob/master/python/pyspark/mllib/linalg/__init__.py#L531
{code}
for i in xrange(len(self.indices) - 1):
if self.indices[i] >= self.indices[i + 1]:
raise TypeError("indices array must be sorted")
{code}
It should match the error message in the Scala version, which is: "Found
duplicate indices"
https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/mllib/linalg/Vectors.scala#L301
> PySpark SparseVector should have "Found duplicate indices: " error message
> --------------------------------------------------------------------------
>
> Key: SPARK-11531
> URL: https://issues.apache.org/jira/browse/SPARK-11531
> Project: Spark
> Issue Type: Improvement
> Components: MLlib, PySpark
> Affects Versions: 1.5.1
> Reporter: Urvish Parikh
> Priority: Trivial
>
> Currently when there are duplicate indices in the SparseVector it will return
> an error message "indices array must be sorted"
> From:
> https://github.com/apache/spark/blob/master/python/pyspark/mllib/linalg/__init__.py#L531
> {code}
> for i in xrange(len(self.indices) - 1):
> if self.indices[i] >= self.indices[i + 1]:
> raise TypeError("indices array must be sorted")
> {code}
> It should match the error message in the Scala version, which is: "Found
> duplicate indices"
> https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/mllib/linalg/Vectors.scala#L301
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]