title: Convert array of vectors to DenseVector
body: <p>I am running Spark 2.1 with Scala. I am trying to convert and array of vectors into a <code>DenseVector</code>.</p>
  
  <p>Here is my dataframe:</p>
  
  <pre><code>scala&gt; df_transformed.printSchema()
  root
   |-- id: long (nullable = true)
   |-- vals: vector (nullable = true)
   |-- hashValues: array (nullable = true)
   |    |-- element: vector (containsNull = true)
  
  scala&gt; df_transformed.show()
  +------------+--------------------+--------------------+
  |          id|                vals|          hashValues|
  +------------+--------------------+--------------------+
  |401310732094|[-0.37154,-0.1159...|[[-949518.0], [47...|
  |292125586474|[-0.30407,0.35437...|[[-764013.0], [31...|
  |362051108485|[-0.36748,0.05738...|[[-688834.0], [18...|
  |222480119030|[-0.2509,0.55574,...|[[-1167047.0], [2...|
  |182270925238|[0.32288,-0.60789...|[[-836660.0], [97...|
  +------------+--------------------+--------------------+
  </code></pre>
  
  <p>For example, I need to extract the value of the <code>hashValues</code> column into a <code>DenseVector</code>for id 401310732094.</p>