title: How to convert scala vector to spark ML vector?
body: <p>I have a vector of type <code>scala.collection.immutable.Vector</code> and would like to convert it to a vector of type <code>org.apache.spark.ml.linalg.Vector</code>.</p>
  
  <p>For example, I want something like the following;    </p>
  
  <pre><code>import org.apache.spark.ml.linalg.Vectors
  val scalaVec = Vector(1,2,3)
  val sparkVec = Vectors.dense(scalaVec)
  </code></pre>
  
  <p>Note that I could simply type <code>val sparkVec = Vectors.dense(1,2,3)</code> but I want to convert existing scala collection Vectors. I want to do this to embed these DenseVectors in a DataFrame to feed into spark.ml pipelines.</p>