Skip to content

Commit

Permalink
remove int fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Intron7 committed Feb 11, 2025
1 parent 6eafd04 commit 1dae8f4
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/scanpy/preprocessing/_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,10 +771,6 @@ def regress_out(
# if the regressors are not categorical and the matrix is not singular
# use the shortcut numpy_regress_out
if not variable_is_categorical and np.linalg.det(regressors.T @ regressors) != 0:
if np.issubdtype(X.dtype, np.integer):
target_dtype = np.float32 if X.dtype.itemsize == 4 else np.float64
X = X.astype(target_dtype)

X = _to_dense(X, order="C") if issparse(X) else X
res = numpy_regress_out(X, regressors)

Expand Down

0 comments on commit 1dae8f4

Please sign in to comment.