[Numpy-discussion] Importing a list into a structured numpy array, what is my error?

2011-05-18 Thread Robert Love
my_list = [[1960, 'W0'],[2001, 'D5']] my_arr = np.array(my_list, dtype=('uint', '|S2')) gives me an error I don't understand: ValueError: mismatch in size of old and new data-descriptor What are the old and new? I get the same problem if try np.asarray() If I make the dtype ('|S4',

Re: [Numpy-discussion] Importing a list into a structured numpy array, what is my error?

2011-05-18 Thread Jonathan March
On Wed, May 18, 2011 at 8:56 PM, Robert Love rblove_li...@comcast.netwrote: my_list = [[1960, 'W0'],[2001, 'D5']] my_arr = np.array(my_list, dtype=('uint', '|S2')) gives me an error I don't understand: ValueError: mismatch in size of old and new data-descriptor What are the old