[Numpy-discussion] Recarray and shared datas

Travis Oliphant oliphant at ee.byu.edu
Mon Apr 10 15:07:06 CDT 2006

Benjamin Thyreau wrote:

>Numpy has a nice feature of recarray, ie. record which can hold columns names.
>I'd like to use such a feature in order to better interact with R, ie. passing
>R datas to python without copy. The current rpy bindings do a full copy, and
>convert to simple ndarray. Looking at the recarray api in the Guide,
>and also at the source code, i don't find any recarray constructor which can
>get shared datas (all the examples from section 8.6 are doing copies).
>Is there some way to do it ? in Python or in C ? Or is there any plans to ?
Yes, you can share data with a recarray because a "recarray" is just a 
numpy array with a fancy data-type and with attribute access 
over-ridding to do "field" lookups if the attribute cannot otherwise be 

What exactly are you trying to share data with?   I'm having a hard time 
understanding how to answer your question without more information.



More information about the Numpy-discussion mailing list