Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-14739

Vectors.parse doesn't handle dense vectors of size 0 and sparse vectors with no indices

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.0, 2.0.0
    • Fix Version/s: 1.6.2, 2.0.0
    • Component/s: MLlib, PySpark
    • Labels:
      None

      Description

      DenseVector:

      Vectors.parse(str(Vectors.dense([])))
      ## ValueError                                Traceback (most recent call last)
      ## .. 
      ## ValueError: Unable to parse values from
      

      SparseVector:

      Vectors.parse(str(Vectors.sparse(5, [], [])))
      ## ValueError                                Traceback (most recent call last)
      ##  ... 
      ## ValueError: Unable to parse indices from .
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                arashpa@gmail.com Arash Parsa
                Reporter:
                zero323 Maciej Szymkiewicz
              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: