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

John Salvatier jsalvati at u.washington.edu
Wed Mar 16 09:56:18 EDT 2011

Loop through to build a list of arrays, then use vstack on the list.

On Wed, Mar 16, 2011 at 1:36 AM, John <washakie at gmail.com> 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 dictionary of arrays to
> a single array?
> All the arrays have the same 'headings' and width, but different lengths.
> Is there something I can do that would be more efficient than looping
> through and using np.concatenate (vstack)?
> --john
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110316/4952f63d/attachment.html>

More information about the NumPy-Discussion mailing list