Skip to content

Commit

Permalink
Merge pull request #23 from Intron7/_obs&_var-update
Browse files Browse the repository at this point in the history
added default Dataframe for obs and var
  • Loading branch information
Intron7 authored May 16, 2023
2 parents c01fcbc + d3b4b8f commit 853a619
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions rapids_singlecell/cunnData/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,14 @@ def __init__(
del inter
else:
self._X = cp.sparse.csr_matrix(X, dtype=cp.float32)

self._obs = obs
self._var = var
if obs:
self._obs = obs
else:
self._obs = pd.DataFrame(index=range(self.shape[0]))
if var:
self._var = var
else:
self._var = pd.DataFrame(index=range(self.shape[1]))
if uns:
self._uns = uns
else:
Expand Down

0 comments on commit 853a619

Please sign in to comment.