Skip to content

Commit be9234f

Browse files
fixed bug that division was forced as numpy even though x could be csr_matrix
using np.divide instead of / made the code very slow (seemingly arresting) here.
1 parent ddcd0f0 commit be9234f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

batchglm/models/base_glm/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def closedform_glm_scale(
137137
:return: tuple (groupwise_scales, logphi, rmsd)
138138
"""
139139
if size_factors is not None:
140-
x = np.divide(x, size_factors)
140+
x = x / size_factors
141141

142142
# to circumvent nonlocal error
143143
provided_groupwise_means = groupwise_means

0 commit comments

Comments
 (0)