From f57a9b0b4c3a60876ca2682f89729063ab0ca18b Mon Sep 17 00:00:00 2001 From: "Philipp A." Date: Mon, 11 Nov 2024 14:38:41 +0100 Subject: [PATCH] Fix merge --- src/scanpy/preprocessing/_scale.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/scanpy/preprocessing/_scale.py b/src/scanpy/preprocessing/_scale.py index 99ef971eb2..07f55089c3 100644 --- a/src/scanpy/preprocessing/_scale.py +++ b/src/scanpy/preprocessing/_scale.py @@ -30,10 +30,6 @@ if TYPE_CHECKING: from numpy.typing import ArrayLike, NDArray - from numpy.typing import NDArray - from scipy import sparse as sp - - CSMatrix = sp.csr_matrix | sp.csc_matrix CSMatrix = csr_matrix | csc_matrix @@ -79,14 +75,6 @@ def clip_array( return X -def clip_set(x: CSMatrix, *, max_value: float, zero_center: bool = True) -> CSMatrix: - x = x.copy() - x[x > max_value] = max_value - if zero_center: - x[x < -max_value] = -max_value - return x - - @renamed_arg("X", "data", pos_0=True) @old_positionals("zero_center", "max_value", "copy", "layer", "obsm") @singledispatch