From 9df14994eb757897b7fd099e126fef7013ee08cc Mon Sep 17 00:00:00 2001 From: andreapasqua Date: Fri, 17 Jun 2016 18:08:30 -0700 Subject: [PATCH] Fix SparseVector parser assertion for end parenthesis --- python/pyspark/mllib/linalg/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyspark/mllib/linalg/__init__.py b/python/pyspark/mllib/linalg/__init__.py index 70509a6d9bece..3a345b2b5638c 100644 --- a/python/pyspark/mllib/linalg/__init__.py +++ b/python/pyspark/mllib/linalg/__init__.py @@ -569,7 +569,7 @@ def parse(s): 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()