Skip to content

Commit 5a3e07d

Browse files
committed
remove unsused _std function, clean up logs
1 parent 086890a commit 5a3e07d

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

src/rapids_singlecell/decoupler_gpu/_method_waggr.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@
99
from rapids_singlecell.decoupler_gpu._helper._log import _log
1010
from rapids_singlecell.decoupler_gpu._helper._Method import Method, MethodMeta
1111

12-
def _std(x: cp.ndarray, ddof: int) -> float:
13-
N = x.shape[0]
14-
m = cp.mean(x)
15-
var = cp.sum((x - m) ** 2) / (N - ddof)
16-
sd = cp.sqrt(var)
17-
return float(sd)
18-
1912
def _ridx(
2013
times: int,
2114
nvar: int,
@@ -103,7 +96,7 @@ def _f(mat, adj):
10396
_f.__name__ = f.__name__
10497
if _f.__name__ not in _cfuncs:
10598
_cfuncs[f.__name__] = _f
106-
m = f"waggr - using {_f.__name__} for the first time, will need to be compiled"
99+
m = f"waggr - using {_f.__name__}"
107100
_log(m, level="info", verbose=verbose)
108101

109102
_fun_dict = {
@@ -144,7 +137,6 @@ def _validate_func(
144137
res = fun(x=x, w=w)
145138
assert isinstance(res, cp.ndarray), "output of fun must be a cp.ndarray"
146139
assert res.shape == (x.shape[0], w.shape[1]), "output of fun must be a cp.ndarray with shape (x.shape[0], w.shape[1])"
147-
# assert isinstance(res, int | float), "output of fun must be a single numerical value"
148140
except Exception as err:
149141
raise ValueError(f"fun failed to run with test data: fun(x={x}), w={w}") from err
150142
m = f"waggr - using function {fun.__name__}"

0 commit comments

Comments
 (0)