NumPyBuffer sets is_mutable_, but does not set mutable_data_ in it's
constructor (code
<https://github.com/apache/arrow/blob/d1ffe7229f327de8e9dbb7785b7c6e38d2c3319e/cpp/src/arrow/python/numpy_convert.cc#L51-L53>)
even if the numpy array is mutable (NPY_ARRAY_WRITEABLE). However,
MutableBuffer sets mutable_data_ and is_mutable_ (link
<https://github.com/apache/arrow/blob/d1ffe7229f327de8e9dbb7785b7c6e38d2c3319e/cpp/src/arrow/buffer.h#L391-L400>).
Is NumPyBuffer constructor wrong?

In my case, I am working on an application that rewraps the Buffers used
by arrow arrays and uses the GetMutableValues method to get the pointer.
For NumPyBuffer this is returning null even when is_mutable is returning
true.

If this is a bug I can create a PR to fix it.

Thanks!

-Arthur


-- 


        

*Arthur Michener Peters*, Software Engineer

He/him/his

        

*KATANA GRAPH*

400 West 15th Street, Suite 150, Austin, TX 78701

a...@katanagraph.com <mailto:a...@katanagraph.com>

_katanagraph.com_ <http://katanagraph.com/>

   

Reply via email to