GitHub user zero323 opened a pull request:
https://github.com/apache/spark/pull/9009
[SPARK-10973] __gettitem__ method throws IndexError exception when weâ¦
__gettitem__ method throws IndexError exception when we try to access index
after the last non-zero entry
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
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zero323/spark sparse_vector_index_error
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/9009.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #9009
----
commit d28a644f6f65ddc48549766f6037dec2f1f1dc8d
Author: zero323 <[email protected]>
Date: 2015-10-07T11:18:15Z
[SPARK-10973] __gettitem__ method throws IndexError exception when we try
to access index after the last non-zero entry.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]