On 2/14/10 9:14 AM, Laurent Gautier wrote:
> On 2/14/10 7:57 AM, Nathaniel Smith wrote:
>> On Sat, Feb 13, 2010 at 9:55 PM, Laurent Gautier<lgaut...@gmail.com>
>> wrote:
>>> Hi,
>>>
>>> rpy2-2.1.x will be dropping the "__array_struct__" way to export array
>>> information from R arrays to numpy arrays, and use instead the new
>>> buffer protocol in Python.
>>>
>>> This likely means that all numpy-related features in rpy2 will only be
>>> supported with Python>= 2.6 and numpy>= 1.3, but this also means that
>>> wizardry like "views" on vectors and arrays (that is an object is a
>>> "view" on larger array or vector, without a copy of the subset of data
>>> made) is getting possible.
>>
>> No objection to this, but views work just fine with the old
>> __array_struct__ way too, so I find your description confusing :-).
>
> __array_struct__ is currently used to inform numpy about the structure
> of a given R vector/array (that is length, type, number of dimensions,
> etc...).
>
> This is going away by having R vectors/arrays exposed through rpy2
> implement the buffer protocol. Recent numpy version know how to find the
> information they need (and used to obtain through __array_struct__ there).
>
> [There is certainly the possibility to leave __array_struct__ as an
> unsupported deprecated feature if someone requests it].
>


Well well... it looks like this is going to be the other way around:
__array_struct__ is going to stay for 2.1, while the buffer thing will 
be an shiny experimental feature.
(I just realized that I was basing my comments from a fresh snapshot of 
the numpy trunk).


L.

PS: I just fixed an issue with endianness and __array_struct__ in rpy2. 
I do not know for how it has been there... strange that nobody reported it.

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to