You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Maciej Szymkiewicz (JIRA)" <ji...@apache.org> on 2015/10/07 17:15:26 UTC
[jira] [Created] (SPARK-10973) __gettitem__ method throws
IndexError exception when we try to access index after the last non-zero
entry.
Maciej Szymkiewicz created SPARK-10973:
------------------------------------------
Summary: __gettitem__ method throws IndexError exception when we try to access index after the last non-zero entry.
Key: SPARK-10973
URL: https://issues.apache.org/jira/browse/SPARK-10973
Project: Spark
Issue Type: Bug
Components: MLlib, PySpark
Affects Versions: 1.5.0, 1.4.0, 1.3.0, 1.6.0
Reporter: Maciej Szymkiewicz
\_\_gettitem\_\_ method throws IndexError exception when we try to access index after the last non-zero entry.
{code}
from pyspark.mllib.linalg import Vectors
sv = Vectors.sparse(5, {1: 3})
sv[0]
## 0.0
sv[1]
## 3.0
sv[2]
## Traceback (most recent call last):
## File "<stdin>", line 1, in <module>
## File "/python/pyspark/mllib/linalg/__init__.py", line 734, in __getitem__
## row_ind = inds[insert_index]
## IndexError: index out of bounds
{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