import numpy as np import pyarrow as pa from scipy.sparse import csr_matrix
a = np.random.rand(100) a[a < .9] = 0.0 s = csr_matrix(a) arrow_sparse_csr_matrix = pa.SparseCSRMatrix.from_scipy(s)Now, how do I use that to build a pyarrow table? Stay tuned...
On 7/1/2022 8:19 AM, dl wrote:
I find pyarrow.SparseCSRMatrix mentioned here. But how do I use that? Is there documentation for that class?
On 7/1/2022 7:47 AM, dl wrote:
Hi,
I'm trying to understand support for sparse tensors in Arrow. It looks like there is "experimental" support using the C++ API. When was this introduced? I see in the code base here Cython sparse array classes. Can these be accessed using the Python API. Are they included in the 8.0.0 release? Is there any other support for sparse arrays/tensors in the Python API? Are there good examples for any of this, in particular for using the 8.0.0 Python API to create sparse tensors?
Thanks,
David
