Skip to content

Commit

Permalink
update docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Intron7 committed Dec 19, 2024
1 parent 8596c4e commit f71b304
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rapids_singlecell/preprocessing/_harmony/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def _normalize_cp_p1(X: cp.ndarray) -> cp.ndarray:

def _normalize_cp(X: cp.ndarray, p: int = 2) -> cp.ndarray:
"""
Analogous to torch.nn.functional.normalize, p in numpy is known as ord.
Analogous to `torch.nn.functional.normalize` for `axis = 1`, `p` in numpy is known as `ord`.
"""
if p == 2:
return X / cp.linalg.norm(X, ord=2, axis=1, keepdims=True).clip(min=1e-12)
Expand Down

0 comments on commit f71b304

Please sign in to comment.