[SciPy-User] structured array question? (slow learner :)
Vincent Davis
vincent@vincentdavis....
Sat Mar 6 10:44:38 CST 2010
Ok not sure what I am doing wrong here, In fact I am sure this was working
and now I updated python and it doesn't now. I am skeptical that that is
true. My question is what is happening to the strings?
>>> import numpy as np
>>> a = [(1,1),(1,2),(1,3),(2,4),(2,5),(2,6)]
>>> b = [(1,1,'apple', 'pie'),(2,5,'boys','play')]
>>> aa = np.array(a, [('x',int),('y',int)])
>>> bb = np.array(b, [('x',int),('y',int), ('xb',str), ('yb',str)])
>>> bb
array([(1, 1, '', ''), (2, 5, '', '')],
dtype=[('x', '<i8'), ('y', '<i8'), ('xb', '|S0'), ('yb', '|S0')])
>>>
*Vincent Davis
720-301-3003 *
vincent@vincentdavis.net
my blog <http://vincentdavis.net> |
LinkedIn<http://www.linkedin.com/in/vincentdavis>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20100306/e185e8d1/attachment.html
More information about the SciPy-User
mailing list