Skip to content

Fix/deepcopy subset - #670

Merged
ivirshup merged 4 commits into
scverse:masterfrom
michalk8:fix/deepcopy-subset
Jan 11, 2022
Merged

ivirshup merged 4 commits into
scverse:masterfrom
michalk8:fix/deepcopy-subset

Conversation

@michalk8

Copy link
Copy Markdown
Contributor

closes #656

@codecov

codecov Bot commented Dec 30, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #670 (eada0cc) into master (664e32b) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #670      +/-   ##
==========================================
- Coverage   83.09%   83.08%   -0.02%     
==========================================
  Files          34       34              
  Lines        4349     4351       +2     
==========================================
+ Hits         3614     3615       +1     
- Misses        735      736       +1     
Impacted Files Coverage Δ
anndata/_core/views.py 88.88% <100.00%> (-0.68%) ⬇️

@ivirshup
ivirshup self-requested a review January 11, 2022 08:58

@ivirshup ivirshup left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That problem is weirder that I thought. How has this not come up before?

Anyways, LGTM. Thanks for the fix!

@ivirshup
ivirshup merged commit 1046f41 into scverse:master Jan 11, 2022
ivirshup added a commit to ivirshup/anndata that referenced this pull request Jan 11, 2022
I'm not sure what was going on with the `if not self.is_backed: if self.is_view` chunk.
Was possibly fixed by scverse#670
ivirshup added a commit that referenced this pull request Jan 11, 2022
* Add X=None IO tests

* Fix `adata.copy` when `X = None`

I'm not sure what was going on with the `if not self.is_backed: if self.is_view` chunk.
Was possibly fixed by #670

* Allow ad.concat(...) when all anndatas to be concatenated have `.X = None`

Additionally, throws a not implemented error for the case where only some AnnData's have a value for `.X`

* adata.to_df() now errors when adata.X is None

* Test to_df on views when X is None

* Re-use ._has_X in ._mutated_copy

* Allow _subset_inplace when X is None

* Release note (looks like last additions were never announced)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deepcopy of a copy after view raises an error

2 participants