-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unknown dtype dtype('int64') cannot be converted to ?gRMatrix. #122
Comments
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:
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 rpy2 is getting rid of I’ll leave this open to
|
This is still a problem. In my adata, there are certain arrays I'm unable to convert to float32, so I'm unable to bypass this issue.. |
OK, I took the time to fix it. It uses |
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)
The text was updated successfully, but these errors were encountered: