Re: Sending shared pointers from python to R

2020-04-27 Thread Neal Richardson
See https://github.com/apache/arrow/blob/master/r/R/python.R for the r_to_py/py_to_r functions, and https://github.com/apache/arrow/blob/master/r/src/py-to-r.cpp for how they call the C++ library's implementation of the C data interface, in case you need to go down to that level. In case it's help

Re: Sending shared pointers from python to R

2020-04-26 Thread Wes McKinney
Agreed -- please check 0.17.0. Also, note that the C Data Interface makes moving shared_ptr between R and Python radically simpler. See the "py_to_r" functions in https://github.com/apache/arrow/blob/master/r/tests/testthat/test-python.R Similar "r_to_py" functions could be written to use rpy2 I

Re: Sending shared pointers from python to R

2020-04-26 Thread Micah Kornfield
Hi Jeffrey, I don't have expertise in this area (hopefully someone else can chime in), but we recently released 0.17.0 could you check if this is still an issue with the newer version? Thanks, Micah On Sat, Apr 25, 2020 at 10:43 PM Jeffrey Wong wrote: > I was able to simplify this very much. Th

Re: Sending shared pointers from python to R

2020-04-25 Thread Jeffrey Wong
I was able to simplify this very much. There is a problem with pyarrow==0.16.0, r-arrow==0.16.0, and rpy2. Just by loading pyarrow, rpy2 will not be able to load r-arrow. This set of imports fails now, but was fine in 0.14.1. Is it possible there is a conflict with shared objects that pyarrow loads

Sending shared pointers from python to R

2020-04-25 Thread Jeffrey Wong
Hello, I am using Arrow Table's to facilitate fast data transfer between python and R. The below strategy worked with arrow==0.14.1, but is no longer working in arrow == 0.16.0. Using pyarrow, I convert a pandas dataframe to a pyarrow Table, then get the memory address to the underlying Arrow Tabl