code: def vector_to_array(vector: Union[Column, str]) -> Column:
      """
      Converts a ``spark.ml`` ``Vector`` (sparse or dense) to an array of doubles.
  
      Added in version 0.3.0.
  
      Examples:
          >>> from pyspark.ml.linalg import DenseVector, SparseVector
          >>> df = spark.createDataFrame([Row(v=SparseVector(3, {0: 1.0, 2: 2.0})), Row(v=DenseVector([3.0, 4.0]))])
          >>> df.select(glow.vector_to_array('v').alias('arr')).collect()
          [Row(arr=[1.0, 0.0, 2.0]), Row(arr=[3.0, 4.0])]
  
      Args:
          vector : Vector to convert
  
      Returns:
          An array of doubles
      """
      assert check_argument_types()
      output = Column(
          sc()._jvm.io.projectglow.functions.vector_to_array(
              _to_java_column(vector)
          )
      )
      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 9 for calling a global function with example usage: vector_to_array(vector) and returns: output