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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.0, 2.0.0
    • 1.6.2, 2.0.0
    • MLlib, PySpark
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: