From b4371fac31ef8b27c5bab632cf5aa7fdc1eb8bb4 Mon Sep 17 00:00:00 2001 From: John Ma Date: Tue, 25 Jul 2023 13:22:59 -0700 Subject: [PATCH 1/3] Change input type of pca.fit_transform to ndarray --- kb_python/report/report_matrix.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kb_python/report/report_matrix.ipynb b/kb_python/report/report_matrix.ipynb index bd8ff86..b12733a 100644 --- a/kb_python/report/report_matrix.ipynb +++ b/kb_python/report/report_matrix.ipynb @@ -158,7 +158,7 @@ "sc.pp.normalize_total(adata, target_sum=1e4)\n", "sc.pp.log1p(adata)\n", "pca = PCA(n_components=10)\n", - "pc = pca.fit_transform(adata.X.todense())" + "pc = pca.fit_transform(adata.X.toarray())" ] }, { From 8a30f19cba4ad7d98a01917f9ae4275fc23cbaab Mon Sep 17 00:00:00 2001 From: John Ma Date: Tue, 25 Jul 2023 13:28:00 -0700 Subject: [PATCH 2/3] Revert "Change input type of pca.fit_transform to ndarray" This reverts commit b4371fac31ef8b27c5bab632cf5aa7fdc1eb8bb4. --- kb_python/report/report_matrix.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kb_python/report/report_matrix.ipynb b/kb_python/report/report_matrix.ipynb index b12733a..bd8ff86 100644 --- a/kb_python/report/report_matrix.ipynb +++ b/kb_python/report/report_matrix.ipynb @@ -158,7 +158,7 @@ "sc.pp.normalize_total(adata, target_sum=1e4)\n", "sc.pp.log1p(adata)\n", "pca = PCA(n_components=10)\n", - "pc = pca.fit_transform(adata.X.toarray())" + "pc = pca.fit_transform(adata.X.todense())" ] }, { From 77fc5d0a9bd3288e15da21448b7e4a30d5f55748 Mon Sep 17 00:00:00 2001 From: John Ma Date: Tue, 25 Jul 2023 13:37:59 -0700 Subject: [PATCH 3/3] Changing dtype of `fit_transform` to ndarray --- kb_python/report/report_matrix.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kb_python/report/report_matrix.ipynb b/kb_python/report/report_matrix.ipynb index bd8ff86..b12733a 100644 --- a/kb_python/report/report_matrix.ipynb +++ b/kb_python/report/report_matrix.ipynb @@ -158,7 +158,7 @@ "sc.pp.normalize_total(adata, target_sum=1e4)\n", "sc.pp.log1p(adata)\n", "pca = PCA(n_components=10)\n", - "pc = pca.fit_transform(adata.X.todense())" + "pc = pca.fit_transform(adata.X.toarray())" ] }, {