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

del adata.raw #445

Closed
rcannood opened this issue Nov 9, 2020 · 1 comment · Fixed by #447
Closed

del adata.raw #445

rcannood opened this issue Nov 9, 2020 · 1 comment · Fixed by #447
Labels

Comments

@rcannood
Copy link
Contributor

rcannood commented Nov 9, 2020

Hello all!

Quoting from AnnData documentation:

Its content can be deleted:

adata.raw = None
# or
del adata.raw

Running adata.raw = None throws an error, however:

>>> adata_dense.raw = None
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/rcannood/.local/lib/python3.8/site-packages/anndata/_core/anndata.py", line 756, in raw
    raise ValueError(
ValueError: Can only init raw attribute with an AnnData object. Do `del adata.raw` to delete it

Could you add if raw is None to the raw setter?

Robrecht

@ivirshup
Copy link
Member

Haha, sounds reasonable. Thanks for the report!

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

Successfully merging a pull request may close this issue.

3 participants