title: Numpy savetxt loop
body: <p>Using Numpy, I am going to split an array of dimension <code>(557124,2)</code>, <code>dtype = "S10"</code>, in 6 subarrays using:</p>
  
  <pre><code>sub_arr = np.split(arr, 6)
  </code></pre>
  
  <p>Now I would like to use a <code>for</code> loop on <code>savetxt</code> and save the 6 subarrays to 6 .txt files.</p>
  
  <p>I tried:</p>
  
  <pre><code>for i in sub_array:
      np.savetxt(("Subarray", i, ".txt"), sub_array[i], fmt='%s')
  </code></pre>
  
  <p>There are 2 problems:</p>
  
  <ol>
  <li><p>It's incorrect to say <code>in sub_array</code>. I should use <code>range(5)</code> but I want to make it adaptable to any number of sub arrays.</p></li>
  <li><p>I thought I could use a sort of "paste" as in R when I did <code>("Subarray", i, ".txt")</code>. Is there anything alike in Numpy?</p></li>
  </ol>
  
  <p>Any idea?</p>