Description
Running
SparseVector.parse(' (4, [0,1 ],[ 4.0,5.0] ')
will not raise an exception as expected, although it parses it as if there was an end parenthesis.
This can be fixed by replacing
if start == -1:
raise ValueError("Tuple should end with ')'")
with
if end == -1:
raise ValueError("Tuple should end with ')'")
Please see posted PR