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

Allowing .X to be None #467

Open
9 of 22 tasks
ivirshup opened this issue Nov 27, 2020 · 5 comments
Open
9 of 22 tasks

Allowing .X to be None #467

ivirshup opened this issue Nov 27, 2020 · 5 comments
Milestone

Comments

@ivirshup
Copy link
Member

ivirshup commented Nov 27, 2020

Tracking issue for allowing X to be None.

When parts get ticked off they should be marked with the PR that fixed them.

TODO:

All of these need tests, some of them may already work.


There is a bit of ordering to do here.

  • Getting the property and initializer working will be required for most everything else.
  • IO should happen before backed mode.
  • Backed mode and concatenation are pretty independent.
@ivirshup ivirshup added this to the 0.8 milestone Nov 27, 2020
@flying-sheep
Copy link
Member

@rcannood which of the above points have been adressed by your PR?

@rcannood
Copy link
Contributor

rcannood commented Dec 1, 2020

To begin:

  • Getter, setter, deleter
  • Initializer
  • Transpose

There are also some basic checks for 'Views', but not everything mentioned above has been taken care of so it's still WIP.

@ivirshup
Copy link
Member Author

I've fixed up many of these cases in #677.

I think .X is None is now in a fairly useable state, and think we're in an alright place to push the rest to the next release.

@ivirshup ivirshup modified the milestones: 0.8, 0.9 Jan 11, 2022
@ivirshup
Copy link
Member Author

Adding a point to the checklist:

Gotta figure out what the shape of the object is when X is None. Currently we figure out the shape of an AnnData by checking the shapes of X, obs, and var and asserting everything else fits that. What we should probably start doing is resolving the shape from all elements, so an AnnData with just obsm/ varm can be created.


An interesting question is what happens if you only provide elements aligned to one axis. E.g. just obsm or obs. Is n_vars unknown or zero?

Is this allowed?

adata = AnnData(obs=obs)

Then what is n_vars. Would this be allowed after?

adata.varm["x"] = np.ones((20, 10))

@ivirshup ivirshup modified the milestones: 0.9, 0.10.0 Feb 20, 2023
@ivirshup ivirshup modified the milestones: 0.10.0, 0.11.0 Sep 7, 2023
@ivirshup
Copy link
Member Author

ivirshup commented Aug 8, 2024

We think this is probably closable but we need to verify

@ilan-gold ilan-gold modified the milestones: 0.11.0, 0.12.0 Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants