code: def array_to_dense_vector(arr: Union[Column, str]) -> Column:
      """
      Converts an array of numerics into a ``spark.ml`` ``DenseVector``.
  
      Added in version 0.3.0.
  
      Examples:
          >>> from pyspark.ml.linalg import DenseVector
          >>> df = spark.createDataFrame([Row(arr=[1, 2, 3])])
          >>> df.select(glow.array_to_dense_vector('arr').alias('v')).collect()
          [Row(v=DenseVector([1.0, 2.0, 3.0]))]
  
      Args:
          arr : The array of numerics
  
      Returns:
          A ``spark.ml`` ``DenseVector``
      """
      assert check_argument_types()
      output = Column(
          sc()._jvm.io.projectglow.functions.array_to_dense_vector(
              _to_java_column(arr)
          )
      )
      assert check_return_type(output)
      return output
  
imports: from pyspark import SparkContext
  from pyspark.sql.column import Column, _to_java_column, _to_seq
  from typeguard import check_argument_types, check_return_type
  from typing import Union
label_desc: Use image node_id 4 for calling a global function with example usage: array_to_dense_vector(arr) and returns: output