diff --git a/scvi/data/_preprocessing.py b/scvi/data/_preprocessing.py index 5c1467aa41..172fef4309 100644 --- a/scvi/data/_preprocessing.py +++ b/scvi/data/_preprocessing.py @@ -262,7 +262,7 @@ def organize_cite_seq_10x(adata: anndata.AnnData, copy: bool = False) -> Optiona if copy: adata = adata.copy() - pro_array = adata[:, adata.var["feature_types"] == "Antibody Capture"].X.copy().A + pro_array = adata[:, adata.var["feature_types"] == "Antibody Capture"].X.copy().toarray() pro_names = np.array(adata.var_names[adata.var["feature_types"] == "Antibody Capture"]) genes = (adata.var["feature_types"] != "Antibody Capture").values diff --git a/scvi/external/scar/_model.py b/scvi/external/scar/_model.py index 45dff69fac..6c3cc7c2ad 100644 --- a/scvi/external/scar/_model.py +++ b/scvi/external/scar/_model.py @@ -231,7 +231,7 @@ def get_ambient_profile( ) for b in range(n_batch): try: - count_batch = raw_adata[batch_idx == b].X.astype(int).A + count_batch = raw_adata[batch_idx == b].X.astype(int).toarray() except MemoryError as err: raise MemoryError("use more batches by setting a higher n_batch") from err log_prob_batch = Multinomial(