Skip to content

Commit

Permalink
revert changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gszep committed Apr 16, 2023
1 parent 5b1ea95 commit 846d07e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions anndata/_core/anndata.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def _init_as_view(self, adata_ref: "AnnData", oidx: Index, vidx: Index):

# set data
if self.isbacked:
self._X = None
self._X = self._obs = None

# set raw, easy, as it’s immutable anyways...
if adata_ref._raw is not None:
Expand Down Expand Up @@ -837,13 +837,7 @@ def _set_dim_index(self, value: pd.Index, attr: str):
@property
def obs(self) -> pd.DataFrame:
"""One-dimensional annotation of observations (`pd.DataFrame`)."""
if self.isbacked:
if not self.file.is_open:
self.file.open()
obs = DataFrame(self.file["obs"])
else:
obs = self._obs
return obs
return self._obs

@obs.setter
def obs(self, value: pd.DataFrame):
Expand Down

0 comments on commit 846d07e

Please sign in to comment.