Re: [Numpy-discussion] convert dictionary of arrays into single array

2011-03-21 Thread John
Hey all, just wanted to let you know that this works nicely: stacked = np.vstack(MyDict.values()) So long as the dictionary only cotains the recarrays. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/n

Re: [Numpy-discussion] convert dictionary of arrays into single array

2011-03-16 Thread John
Yes, stacking is fine, and looping per John's suggestion is what I've done, I was just wondering if there was possibly a more 'pythonic' or more importantly efficient way than the loop. Thanks, john On Wed, Mar 16, 2011 at 3:38 PM, John Salvatier wrote: > I think he wants to stack them (same wid

Re: [Numpy-discussion] convert dictionary of arrays into single array

2011-03-16 Thread John Salvatier
I think he wants to stack them (same widths) so stacking them should be fine. On Wed, Mar 16, 2011 at 7:30 AM, Bruce Southey wrote: > On 03/16/2011 08:56 AM, John Salvatier wrote: > > Loop through to build a list of arrays, then use vstack on the list. > > On Wed, Mar 16, 2011 at 1:36 AM, John

Re: [Numpy-discussion] convert dictionary of arrays into single array

2011-03-16 Thread Bruce Southey
On 03/16/2011 08:56 AM, John Salvatier wrote: Loop through to build a list of arrays, then use vstack on the list. On Wed, Mar 16, 2011 at 1:36 AM, John > wrote: Hello, I have a dictionary with structured arrays, keyed by integers 0...n. There are no oth

Re: [Numpy-discussion] convert dictionary of arrays into single array

2011-03-16 Thread John Salvatier
Loop through to build a list of arrays, then use vstack on the list. On Wed, Mar 16, 2011 at 1:36 AM, John wrote: > Hello, > > I have a dictionary with structured arrays, keyed by integers 0...n. > There are no other keys in the dictionary. > > What is the most efficient way to convert the dicti

[Numpy-discussion] convert dictionary of arrays into single array

2011-03-16 Thread John
Hello, I have a dictionary with structured arrays, keyed by integers 0...n. There are no other keys in the dictionary. What is the most efficient way to convert the dictionary of arrays to a single array? All the arrays have the same 'headings' and width, but different lengths. Is there somethi