Skip to content

Commit

Permalink
split out #168 to make this PR smaller
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkerl committed Jun 20, 2022
1 parent e1b70e4 commit 99f1612
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions apis/python/src/tiledbsc/assay_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,9 +597,19 @@ def to_csr_matrix(self, row_labels, col_labels):
s = util.get_start_stamp()
print(f"{self._indent}START read {self.uri}")

csr = self.csr()
df = self.df()

retval = util.X_and_ids_to_sparse_matrix(
df,
self.row_dim_name,
self.col_dim_name,
self.attr_name,
row_labels,
col_labels,
return_as="csr",
)

if self._verbose:
print(util.format_elapsed(s, f"{self._indent}FINISH read {self.uri}"))

return csr
return retval

0 comments on commit 99f1612

Please sign in to comment.