From b6295f0e54e9a9068d5db3081a29b0ba1bb25d7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=B6ger?= Date: Thu, 7 Nov 2024 08:38:20 +0100 Subject: [PATCH] increased chunk size for upper triangle matrix calc --- src/cleaner/selfclean_cleaner.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cleaner/selfclean_cleaner.py b/src/cleaner/selfclean_cleaner.py index 071e7e7..90b8fb0 100644 --- a/src/cleaner/selfclean_cleaner.py +++ b/src/cleaner/selfclean_cleaner.py @@ -170,8 +170,9 @@ def fit( ) triu_indices = np.triu_indices(self.N, k=1) # create the upper triangular matrix of the distance matrix - n_chunks = math.ceil(len(triu_indices[0]) / self.chunk_size) - iterator = range(0, len(triu_indices[0]), self.chunk_size) + chunk_size = int(self.chunk_size * (self.chunk_size - 1) / 2) + n_chunks = math.ceil(len(triu_indices[0]) / chunk_size) + iterator = range(0, len(triu_indices[0]), chunk_size) for start_idx in ( tqdm( iterator,