arrow-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurent Gautier <lgaut...@gmail.com>
Subject Re: Sharing a C++-level pointer between Python and R
Date Sun, 03 Jan 2021 19:22:07 GMT
Thanks. I looked at it. I think I know how it works and the amount of
plumbing should be fairly minimal.

Using reticulate from rpy2 is not an option because of a long-standing
issue (segfault when reticulate trying to initialize Python).

I am unclear about how to bridge cffi and Cython though.
Is there an example of using the C-code in pyarrow from a Python
C-extension? (the same C structures and functions already made accessible
to Cython).

Le sam. 2 janv. 2021 à 19:20, Wes McKinney <wesmckinn@gmail.com> a écrit :

> We can go R to/from Python from an R perspective with reticulate
>
> https://arrow.apache.org/docs/r/articles/python.html
>
> There are unit tests attesting to this working:
>
> https://github.com/apache/arrow/blob/master/r/tests/testthat/test-python.R
>
> However, I don't know of anyone trying to get interop from a Python
> perspective with rpy2; there may be a small amount of plumbing needed
> to get it working, others may know more.
>
> On Sat, Jan 2, 2021 at 5:20 PM Laurent Gautier <lgautier@gmail.com> wrote:
> >
> > Hi,
> >
> > I am looking at sharing a pointer between Python and R. For example
> create an Arrow object with Python, perform initial filtering, and then
> pass a shared pointer to R through rpy2 (meaning that an R6 object is
> created from this pointer and R package arrow).
> >
> > I found in the source a file that suggest thats Python-to-R is either
> planned or may be even already functional:
> https://github.com/apache/arrow/blob/master/r/src/py-to-r.cpp
> > However, I did not find documentation about it.
> >
> > Would anyone here know more about this?
> >
> > Best,
> >
> > Laurent
> >
> >
>

Mime
View raw message