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,