scala - convert tuplen of long datatype to Array[Long] : <p>I get the counts of dataframe columns from spark to scala variable as below</p>

<pre><code>scala&gt; col_counts
res38: (Long, Long, Long) = (3,3,0)

scala&gt;
</code></pre>

<p>Now, I want to convert this to Array(3,3,0).  I'm doing a roundabout way like</p>

<pre><code>scala&gt; col_counts.toString.replaceAll("""\)|\(""","").split(",")
res47: Array[String] = Array(3, 3, 0)

scala&gt;
</code></pre>

<p>But it looks ugly. Is there an elegant way of getting it? I'm looking for a generic solution to convert any n - Long tuple to Array. </p>
