Graphegon / pygraphblas

GraphBLAS for Python
https://graphegon.github.io/pygraphblas/pygraphblas/index.html
Apache License 2.0
343 stars 27 forks source link

Pyarrow tables as input & output #25

Closed alippai closed 4 years ago

alippai commented 4 years ago

Would it be possible to run the algorithms on the Arrow memory model directly (without copy)?

michelp commented 4 years ago

This is more of a question for SuiteSparse so you may want to create this issue over at https://github.com/DrTimothyAldenDavis/GraphBLAS

GraphBLAS objects are opaque handles, they can only be changed via the API. SuiteSparse has an "Import/Export" API that does O(1) importing of data, but it may involve some copying on the Arrow side to get it into the right formats. Also when importing SuiteSparse takes ownership of the data you pass to it, and you must have created that data using the memory allocation functions passed into GxB_init. It's a bit tricky but I've done something like that with pggraphblas, I don't know much about arrow.