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

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

    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

          Issue Links

            Activity

              People

              • Assignee:
                mgaido Marco Gaido
                Reporter:
                passiv Sivam Pasupathipillai
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: