title: Fast way to transpose np.arrays and write them to file
body: <p>I have situation where I'm writing .TDMS files to .txt files. TDMS file structure has groups that consist of channels that are in numpy array format. I'm trying to figure out the fastest way to loop over the groups and the channels and transpose them to "table" format. I have a working solution but I don't think it's thats fast.</p>
  
  <p>Snippet of my code where file has been opened to <strong>tdms</strong> variable and <strong>groups</strong> variable is a list of groups in that .tdms file. Code loops over the groups and opens the list of channels in that group to <strong>channels</strong> variable. To get the numpy.array data from channel you use channels[list index].data. Then I just with column_stack add the channels to "table" format one by one and save the array with np.savetxt. Could there be a faster way to do this?</p>
  
  <pre class="lang-py prettyprint-override"><code>for i in range(len(groups)):
      output = filepath+"\\"+str(groups[i])+".txt" 
      channels = tdms.group_channels(groups[i]) #list of channels in i group
      data=channels[0].data #np.array for first index in channels list
      for i in range(1,len(channels)):
         data=np.column_stack((data,channels[i].data))       
  
      np.savetxt(output,data,delimiter="|",newline="\n")  
  </code></pre>
  
  <p>Channel data is 1D array. length = 6200</p>
  
  <pre><code>channels[0].data = array([ 12.74204722,  12.74205311,  12.74205884, ...,
      12.78374288,  12.7837487 ,  13.78375434])
  </code></pre>