title: How to cast a WrappedArray[WrappedArray[Float]] to Array[Array[Float]] in spark (scala)
body: <p>Im using Spark 2.0.
  I have a column of my dataframe containing a <code>WrappedArray</code> of WrappedArrays of Float.</p>
  
  <p>An example of a row would be:<br></p>
  
  <pre><code>[[1.0 2.0 2.0][6.0 5.0 2.0][4.0 2.0 3.0]]
  </code></pre>
  
  <p>Im trying to transform this column into an <strong><code>Array[Array[Float]]</code></strong>.</p>
  
  <p>What I tried so far is  the following:</p>
  
  <pre><code>dataframe.select("mycolumn").rdd.map(r =&gt; r.asInstanceOf[Array[Array[Float]]])
  </code></pre>
  
  <p>but I get the following error:</p>
  
  <pre><code>Caused by: java.lang.ClassCastException:
   org.apache.spark.sql.catalyst.expressions.GenericRowWithSchema cannot be cast to [[F
  </code></pre>
  
  <p>Any idea would be highly appreciated. Thanks</p>