Personally I'd prefer pure functions to methods on the types. I
believe this will result in less code to maintain and make argument
polymorphism (function arguments that can be different data types)
more obvious/discoverable. I don't mind having a few conveniences like
`arr.cast(...)` but there's definitely some code bloat from
maintaining these implementations for both Array and ChunkedArray

On Tue, Dec 17, 2019 at 3:27 AM Maarten Breddels
<maartenbredd...@gmail.com> wrote:
>
> Hi Uwe,
>
> Having it in a separate package/module/namespace makes it easier to make it 
> an optional install in the future, might that happen. Also, it would be more 
> tab completion friendly.
>
> Cheers,
>
> Maarten
>
> > On 17 Dec 2019, at 10:24, Uwe L. Korn <m...@uwekorn.com> wrote:
> >
> > Hello all,
> >
> > we have developed quite some compute kernels in C++ nowadays and I would 
> > like to call them from Python. We could expose the kernels on the 
> > Array/ChunkedArray classes themselves or as standalone functions (or as 
> > both). What would be the preferred way?
> >
> > Also exposing them as standalone functions bears the question whether to 
> > have them in the top-level namespace (e.a. pyarrow.sum) or in a separate 
> > one (e.g. pyarrow.compute.sum).
> >
> > Uwe
>

Reply via email to