[Numpy-discussion] Howto create a record array from arrays without copying their data

Ryan May rmay31@gmail....
Wed Aug 12 10:28:55 CDT 2009

On Wed, Aug 12, 2009 at 10:22 AM, Ralph Heinkel <ralph@dont-mind.de> wrote:

> Hi,
> I'm creating (actually calculating) a set of very large 1-d arrays
> (vectors), which I would like to assemble into a record array so I can
> access the data row-wise.  Unfortunately it seems that all data of my
> original 1-d arrays are getting copied in memory during that process.
> Is there a way to get around that?

I don't think so, because fundamentally numpy assumes array elements are
packed together in memory.  If you know C, record arrays are pretty much
arrays of structures.  You could try just using a python dictionary to hold
the arrays, depending on you motives behind using a record array.


Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from Norman, Oklahoma, United States
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090812/a17d863c/attachment.html 

More information about the NumPy-Discussion mailing list