You should be able to use pa.foreign_buffer(): https://arrow.apache.org/docs/python/generated/pyarrow.foreign_buffer.html#pyarrow.foreign_buffer
Regards Antoine. Le 08/11/2018 à 18:49, Randy Zwitch a écrit : > Within OmniSci (MapD), we have the following code that takes a pointer > and length and reads to a NumPy array before calling py_buffer: > > https://github.com/omnisci/pymapd/blob/master/pymapd/shm.pyx#L31-L52 > > Is it possible to eliminate the NumPy step and go directly do an Arrow > buffer? There is both a concern that we're doing an unnecessary memory > copy, as well as wanting to defer to the Arrow way of doing things as > much as possible rather than having our own shims like these. >