-
Notifications
You must be signed in to change notification settings - Fork 126
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
De-hack uns for single gene #309
Comments
This may be a scanpy error, get Alex minimal test case. |
Submitted issue to scanpy: scverse/scanpy#323 |
Fixed in scverse/anndata@ae8a1d0. Thank you! |
FYI I'm also seeing a non-trivial performance cost to the The code in question: anndata/base.py:_init_as_view(), lines 689::
|
@falexwolf - thanks for the fix! Do you expect it to be released soon? It would allow us to remove a bunch of special-case code which handles the forced dimension drop. Thanks! |
Very related issue, just filed on scanpy -- you can't slice both dimensions if one of the results is single-valued. There appears to be an internal inconsistency with how dimension flattening is done in AnnData. |
@csweaver - I will clean up the |
Sorry about the late response: I see that this is an efficient solution if you want to extract single genes, etc. Maybe one should find a more light-weight solution for that? But I'd need to know a bit more... |
wrt So the "need" is to slice and access X or annotations, without the overhead of copying I'm not sure this is a high priority item, especially as it may require API changes, and isn't our largest time sink. Hence the air quotes. |
We should have a better way for serving this case in the future, agreed! |
data.uns = cell_data.uns fails if there is a single gene. Need to fix.
The text was updated successfully, but these errors were encountered: