Skip to content

Commit e089438

Browse files
pre-commit-ci[bot]Reovirus
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 45688e7 commit e089438

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/scanpy/tools/_score_genes.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@ def _get_sparce_nanmean_columns(
4242
def _get_sparce_nanmean_rows(
4343
data: NDArray[Any], indptr: NDArray[np.int32], shape: tuple
4444
) -> NDArray[np.float64]:
45-
#copy 1 time
45+
# copy 1 time
4646
new_ptr = indptr[:-1]
47-
sum_arr = np.add.reduceat(
48-
np.nan_to_num(data, nan=0.0), new_ptr, dtype=np.float64
49-
)
47+
sum_arr = np.add.reduceat(np.nan_to_num(data, nan=0.0), new_ptr, dtype=np.float64)
5048
nans_arr = np.add.reduceat(np.isnan(data), new_ptr, dtype=np.float64)
5149
return sum_arr / (shape[1] - nans_arr)
5250

0 commit comments

Comments
 (0)