single-cell-data / SOMA

A flexible and extensible API for annotated 2D matrix data stored in multiple underlying formats.
MIT License
69 stars 9 forks source link

[Feature Request] `to_arrow` support on AccumulatedCSR #191

Open mdylan2 opened 2 months ago

mdylan2 commented 2 months ago

Hi,

Was wondering if it would be possible to add to_arrow support on AccumulatedCSR [link] in addition to SciPy?

def to_arrow(self):
        return pa.SparseCSRMatrix.from_numpy(data=self.data, indptr=self.indptr, indices=self.indices, shape=self.shape)

Or is there another way to get a PyArrow CSR object from SOMA?