Create Folder with Numpy Savetxt
<p>I'm trying loop over many arrays and create files stored in different folders.</p>

<p>Is there a way to have np.savetxt creating the folders I need as well?</p>

<p>Thanks</p>

<p><code>savetxt</code> just does a <code>open(filename, 'w')</code>.  <code>filename</code> can include a directory as part of the path name, but you'll have to first create the directory with something like <code>os.mkdir</code>.  In other words, use the standard Python directory and file functions.</p>

python numpy