From 304e76771e4aab106a452893b012dd03000ebd31 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Mon, 20 Jun 2022 10:12:25 -0400 Subject: [PATCH] Use existing .csr() method to neaten a callsite (#168) * Use existing .csr() method to neaten a callsite * mkmd.sh was renaming off README.md et al and should not have (#169) * Use existing .csr() method to neaten a callsite --- apis/python/src/tiledbsc/assay_matrix.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/apis/python/src/tiledbsc/assay_matrix.py b/apis/python/src/tiledbsc/assay_matrix.py index a018edaf2d..d2636f42e5 100644 --- a/apis/python/src/tiledbsc/assay_matrix.py +++ b/apis/python/src/tiledbsc/assay_matrix.py @@ -597,19 +597,9 @@ def to_csr_matrix(self, row_labels, col_labels): s = util.get_start_stamp() print(f"{self._indent}START read {self.uri}") - 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", - ) + csr = self.csr() if self._verbose: print(util.format_elapsed(s, f"{self._indent}FINISH read {self.uri}")) - return retval + return csr