From 907658eedf19abc73420183569bcbfeacd6ab7fb Mon Sep 17 00:00:00 2001 From: roi-meir Date: Wed, 10 Sep 2025 16:08:15 +0300 Subject: [PATCH] Delete random_phi variable after usage to save up memory --- schpf/scHPF_.py | 1 + 1 file changed, 1 insertion(+) diff --git a/schpf/scHPF_.py b/schpf/scHPF_.py index dcb327c..2a871f6 100644 --- a/schpf/scHPF_.py +++ b/schpf/scHPF_.py @@ -653,6 +653,7 @@ def _fit(self, X, freeze_genes=False, reinit=True, loss_function=None, random_phi = np.random.dirichlet( np.ones(nfactors), X_batch.data.shape[0]) Xphi_data = X_batch.data[:,None] * random_phi + del random_phi # free memory else: if single_process: Xphi_data = compute_Xphi_data_numpy(X_batch, theta, beta,