diff options
author | andreapasqua <andrea@radius.com> | 2016-06-17 22:41:05 -0700 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2016-06-17 22:41:05 -0700 |
commit | 4c64e88d5ba4c36cbdbc903376492f0f43401e4e (patch) | |
tree | 4bd3effc079937716955857fcc4ff367a1b33cf1 /python/pyspark/mllib/linalg | |
parent | d0ac0e6f433bfccf4ced3743a2526f67fdb5c38e (diff) | |
download | spark-4c64e88d5ba4c36cbdbc903376492f0f43401e4e.tar.gz spark-4c64e88d5ba4c36cbdbc903376492f0f43401e4e.tar.bz2 spark-4c64e88d5ba4c36cbdbc903376492f0f43401e4e.zip |
[SPARK-16035][PYSPARK] Fix SparseVector parser assertion for end parenthesis
## What changes were proposed in this pull request?
The check on the end parenthesis of the expression to parse was using the wrong variable. I corrected that.
## How was this patch tested?
Manual test
Author: andreapasqua <andrea@radius.com>
Closes #13750 from andreapasqua/sparse-vector-parser-assertion-fix.
Diffstat (limited to 'python/pyspark/mllib/linalg')
-rw-r--r-- | python/pyspark/mllib/linalg/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/pyspark/mllib/linalg/__init__.py b/python/pyspark/mllib/linalg/__init__.py index 70509a6d9b..3a345b2b56 100644 --- a/python/pyspark/mllib/linalg/__init__.py +++ b/python/pyspark/mllib/linalg/__init__.py @@ -569,7 +569,7 @@ class SparseVector(Vector): if start == -1: raise ValueError("Tuple should start with '('") end = s.find(')') - if start == -1: + if end == -1: raise ValueError("Tuple should end with ')'") s = s[start + 1: end].strip() |