Open lazappi opened 11 months ago
Hm, seems like there’s an issue with the docs, sorry! What happens if you use
with localconverter(anndata2ri._conv.full_converter()):
globalenv["mat"] = mat
or
adata = AnnData(mat)
with localconverter(anndata2ri._conv.full_converter()):
globalenv["adata"] = adata
Initially I got:
ValueError: Unknown dtype dtype('int64') cannot be converted to ?gRMatrix.
But if I change to:
mat = csr_matrix(poisson(1, size=(100, 2000)), dtype=numpy.float32)
Then both of these work. Thanks!
Should this same code be used within a notebook or is it different in that case?
In notebooks, the best version is to still use activate
, but I’ll get around to fix #109 eventually.
rpy2 is getting rid of activate
, that’s why it has to change.
I’ll leave this open to
I'm having issues converting scipy matrices (possibly other things as well but this is the reproducible example).
Conda environment (I have also tried older scipy versions with the same result)