[Numpy-discussion] A question about dtype syntax

Jean-Baptiste Marquette marquett@iap...
Thu Sep 1 05:15:30 CDT 2011


Hi Warren & Pierre,

> Notice that your array is actually a 2D structured array with shape (n, 1).  Try reshaping it to (n,) or apply np.squeeze before calling savetxt.

Thanks to both of you, I made huge progress to understand how numpy arrays work. I use PyDev under Eclipse, and the debugger showed me that the vstack function generated a 2D array. So I used append instead, and my script now works!

Cheers
JB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20110901/1a9c0fa2/attachment.html 


More information about the NumPy-Discussion mailing list