numpy.savetxt "tuple index out of range"?
<p>I'm trying to write a few lines into a text file, and here's the code I used:</p>

<pre><code>import numpy as np

# Generate some test data
data = np.arange(0.0,1000.0,50.0)

with file('test.txt', 'w') as outfile:      
    outfile.write('# something')

    for data_slice in data: 
        np.savetxt(outfile, data_slice, fmt='%1.4e')

        outfile.write('# New slice\n')
</code></pre>

<p>When the code runs up to the line with savetxt, I get this error:</p>

<pre><code>     IndexError: tuple index out of range
</code></pre>

<p>Any idea why this happens? I tried removing the "fmt" part, but I get the same thing.</p>
