Squeeze out dimension added in modern anndata#179
Merged
Conversation
Collaborator
Author
|
Readthedocs failing: see #166 comment, only warnings, should work for now. This bugfix is more important anyway. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Not sure when this changed, but it seems modern versions of
anndataforceobsmentries to be 2D. Ouradata.obsm['weights']was previously 1D ((n_obs,)), but now it's turned into a(n_obs, 1)matrix after adding it to the adata.crested.pl.bar.normalization_weights()depended on it being 1D, so squeezing it fixes the problem.I checked and the actual X values don't seem to be affected (nor do the values of the normalization weights), it's really just the shape. I noticed this in the plotting tests I'm adding in #166, where it fails for all python versions. It doesn't fail in my existing local environment, but it does in a newly created one, so that's why I'm assuming it's to do with a new anndata version (since I also checked that the calculated matrix before putting it into the anndata is still 1D).