Open ivirshup opened 3 years ago
a = ad.AnnData( np.ones((5, 5)), obs=pd.DataFrame({"key": list("abcde")}, index=[f"cell{i}" for i in range(5)]), obsm={"key": np.ones((5, 10))}, uns={"key": "value"}, ) display(a)
AnnData object with n_obs × n_vars = 5 × 5 obs: 'key' uns: 'key' obsm: 'key'
v = a[:3] display(v)
View of AnnData object with n_obs × n_vars = 3 × 5 obs: 'key' uns: 'key' obsm: 'key'
No-op for uns
del v.uns["key"] display(v)
Does not actualize the view for .obs
.obs
del v.obs["key"] display(v)
View of AnnData object with n_obs × n_vars = 3 × 5 uns: 'key' obsm: 'key'
Does not warn about going from view to actual for obsm
obsm
del v.obsm["key"] display(v)
AnnData object with n_obs × n_vars = 3 × 5 uns: 'key'
Should be relatively straightforward fixes to the views.
I can look into the views after i finish the AnnDataSet pr.
AnnDataSet
No-op for uns
Does not actualize the view for
.obs
Does not warn about going from view to actual for
obsm
Should be relatively straightforward fixes to the views.