Skip to content

Commit

Permalink
fixed bug that division was forced as numpy even though x could be cs…
Browse files Browse the repository at this point in the history
…r_matrix

using np.divide instead of / made the code very slow (seemingly arresting) here.
  • Loading branch information
davidsebfischer committed Aug 29, 2019
1 parent ddcd0f0 commit be9234f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion batchglm/models/base_glm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def closedform_glm_scale(
:return: tuple (groupwise_scales, logphi, rmsd)
"""
if size_factors is not None:
x = np.divide(x, size_factors)
x = x / size_factors

# to circumvent nonlocal error
provided_groupwise_means = groupwise_means
Expand Down

0 comments on commit be9234f

Please sign in to comment.