Hi Suhail,
I'm not sure there are any convenience function to initialize an
ArrayBuilder class from an existing Array.  But I imagine you should be
able to use the cython definitions in
"python//pyarrow/includes/libarrow.pxd" and use it in the way you
describe.  It might help if you can provide a pointer to minimal code
sample.

Thanks,
Micah





On Fri, Nov 15, 2019 at 1:21 PM Suhail Razzak <suhail.raz...@gmail.com>
wrote:

> Hi,
>
> I'm trying to create arrays from an existing array but I'm not sure how
> exactly to do it. I tried using the ArrayBuilder class, but I keep getting
> compiler errors when trying to instantiate one...
>
> So I have a couple questions then:
>
> 1. How would I instantiate and use an ArrayBuilder class?
> 2. Would I build it the same as the C++ way? I.e. builder.get().Append()
> and then builder.get().Finish(new_array)?
> 3. How can I access the underlying data of an Array? I keep getting an
> IndexError when trying array.get().data()[i]
>
> I'm kind of new to Cython too, sorry if this seems dumb.
>
> Thanks,
> Suhail
>

Reply via email to