[Numpy-discussion] savetxt trouble
Wed Feb 20 07:46:41 CST 2013
Robert Kern wrote:
> On Wed, Feb 20, 2013 at 1:25 PM, Neal Becker <email@example.com> wrote:
>> I tried to save a vector as a csv, but it didn't work.
>> The vector is:
>> array([-0.70710678-0.70710678j, 0.70710678+0.70710678j,
>> 0.70710678-0.70710678j, 0.70710678+0.70710678j,
>> np.savetxt ('test.out', a[0,0], delimiter=',')
>> The saved txt file says:
> What were you expecting? A single row? savetxt() always writes out
> len(arr) rows. Reshape your vector into a (1,N) array if you want a
> single row.
More information about the NumPy-Discussion