Skip to content

Commit

Permalink
add order to astype
Browse files Browse the repository at this point in the history
  • Loading branch information
Intron7 committed Feb 11, 2025
1 parent fb98956 commit 1abe26c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scanpy/preprocessing/_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ def 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 = X.astype(target_dtype, order="C")

Check warning on line 757 in src/scanpy/preprocessing/_simple.py

View check run for this annotation

Codecov / codecov/patch

src/scanpy/preprocessing/_simple.py#L756-L757

Added lines #L756 - L757 were not covered by tests
X = _to_dense(X, order="C") if issparse(X) else X
res = numpy_regress_out(X, regressors)

Expand Down

0 comments on commit 1abe26c

Please sign in to comment.