From 5c7061e3a5dcd9b87e4985af8dc03bb2b4b46ce2 Mon Sep 17 00:00:00 2001 From: Intron7 Date: Mon, 16 Dec 2024 10:40:41 +0100 Subject: [PATCH] add returns --- src/rapids_singlecell/preprocessing/_harmony/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rapids_singlecell/preprocessing/_harmony/__init__.py b/src/rapids_singlecell/preprocessing/_harmony/__init__.py index 8ce02c18..4eba2418 100644 --- a/src/rapids_singlecell/preprocessing/_harmony/__init__.py +++ b/src/rapids_singlecell/preprocessing/_harmony/__init__.py @@ -409,7 +409,7 @@ def _compute_objective( O: cp.ndarray, E: cp.ndarray, objective_arr: list, -): +) -> None: kmeans_error = cp.sum(_R_multi_m(R, cp.dot(Z_norm, Y_norm.T))) R = R / R.sum(axis=1, keepdims=True) entropy = cp.sum(R * cp.log(R + 1e-12)) @@ -431,7 +431,7 @@ def _is_convergent_harmony(objectives_harmony: list, tol: float) -> bool: def _is_convergent_clustering( objectives_clustering: list, tol: list, window_size: int = 3 -): +) -> bool: if len(objectives_clustering) < window_size + 1: return False obj_old = 0.0