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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 2.4.3
    • 2.4.4, 3.0.0
    • ML, MLlib, PySpark
    • 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

        Issue Links

          Activity

            People

              mgaido Marco Gaido
              passiv Sivam Pasupathipillai
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: