From eaf3014cfb6e354a76c5a5b313fa8160d3f44221 Mon Sep 17 00:00:00 2001 From: Intron7 Date: Mon, 16 Dec 2024 10:42:26 +0100 Subject: [PATCH] add typing to fuse --- src/rapids_singlecell/preprocessing/_harmony/_fuses.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rapids_singlecell/preprocessing/_harmony/_fuses.py b/src/rapids_singlecell/preprocessing/_harmony/_fuses.py index 64976c07..bc662135 100644 --- a/src/rapids_singlecell/preprocessing/_harmony/_fuses.py +++ b/src/rapids_singlecell/preprocessing/_harmony/_fuses.py @@ -4,7 +4,7 @@ @cp.fuse -def _get_factor(O_k, ridge_lambda): +def _get_factor(O_k: cp.ndarray, ridge_lambda: float) -> cp.ndarray: return 1 / (O_k + ridge_lambda) @@ -29,5 +29,5 @@ def _log_div_OE(O: cp.ndarray, E: cp.ndarray) -> cp.ndarray: @cp.fuse -def _R_multi_m(R, other): +def _R_multi_m(R: cp.ndarray, other: cp.ndarray) -> cp.ndarray: return R * 2 * (1 - other)