@@ -137,29 +137,29 @@ def subset_array(
137
137
data = tiledb_obj .multi_index [row_subset , column_subset ]
138
138
139
139
# Fallback just in case
140
- # shape = (
141
- # tiledb_obj.nonempty_domain()[0][1] + 1,
142
- # tiledb_obj.nonempty_domain()[1][1] + 1,
143
- # )
140
+ shape = (
141
+ tiledb_obj .nonempty_domain ()[0 ][1 ] + 1 ,
142
+ tiledb_obj .nonempty_domain ()[1 ][1 ] + 1 ,
143
+ )
144
144
145
- # mat = sp.coo_matrix(
146
- # (data["data"], (data["cell_index"], data["gene_index"])),
147
- # shape=shape,
148
- # ).tocsr()
145
+ mat = sp .coo_matrix (
146
+ (data ["data" ], (data ["cell_index" ], data ["gene_index" ])),
147
+ shape = shape ,
148
+ ).tocsr ()
149
149
150
- # if row_subset is not None:
151
- # mat = mat[row_subset, :]
150
+ if row_subset is not None :
151
+ mat = mat [row_subset , :]
152
152
153
- # if column_subset is not None:
154
- # mat = mat[:, column_subset]
153
+ if column_subset is not None :
154
+ mat = mat [:, column_subset ]
155
155
156
- _cell_rows , _ = _remap_index (data ["cell_index" ])
157
- _gene_cols , _ = _remap_index (data ["gene_index" ])
156
+ # _cell_rows, _ = _remap_index(data["cell_index"])
157
+ # _gene_cols, _ = _remap_index(data["gene_index"])
158
158
159
- mat = sp .coo_matrix (
160
- (data ["data" ], (_cell_rows , _gene_cols )),
161
- shape = shape ,
162
- )
159
+ # mat = sp.coo_matrix(
160
+ # (data["data"], (_cell_rows, _gene_cols)),
161
+ # shape=shape,
162
+ # )
163
163
164
164
return mat
165
165
0 commit comments