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

DenseVector .toArray() and .values documentation do not specify they are aliases

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.4.3
    • Fix Version/s: 2.4.4, 3.0.0
    • Component/s: ML, MLlib, PySpark
    • Labels:
      None

      Description

      The documentation of the toArray() method and the values property in pyspark.ml.linalg.DenseVector is confusing.

      toArray(): Returns an numpy.ndarray

      values: Returns a list of values

      However, they are actually aliases and they both return a numpy.ndarray.

      FIX: either change the documentation or changeĀ  the values property to return a Python list.

        Attachments

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              mgaido Marco Gaido Assign to me
              Reporter:
              passiv Sivam Pasupathipillai

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment