Skip to content
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

(fix): allow init without X and correct shape inferred #1841

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ilan-gold
Copy link
Contributor

@ilan-gold ilan-gold added this to the 0.11.4 milestone Jan 27, 2025
Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.75%. Comparing base (8d7beab) to head (269741c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1841      +/-   ##
==========================================
- Coverage   86.13%   83.75%   -2.39%     
==========================================
  Files          41       41              
  Lines        6277     6291      +14     
==========================================
- Hits         5407     5269     -138     
- Misses        870     1022     +152     
Files with missing lines Coverage Δ
src/anndata/_core/anndata.py 81.97% <100.00%> (+0.33%) ⬆️

... and 8 files with indirect coverage changes

@@ -85,6 +85,40 @@ def _check_2d_shape(X):
raise ValueError(msg)


def _infer_shape_for_axis(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 things about these functions.

  1. Do they belong in utils? I see we have a bunch at the top of the file here so not sure
  2. Should we do some sort of validation that all the shapes match? I think this happens anyway elsewhere in the codebase e.g., https://github.com/scverse/anndata/blob/main/src/anndata/_core/aligned_mapping.py#L70-L100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Initializing AnnData without X but with layers errors
1 participant