Skip to content

Commit

Permalink
use np.divide
Browse files Browse the repository at this point in the history
  • Loading branch information
patricktnast committed Dec 11, 2024
1 parent 2987250 commit 1c9c5cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vivarium/framework/state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def _normalize_probabilities(
if np.any(total == 0):
raise ValueError("No valid transitions for some simulants.")
else: # total might be less than zero in some places
probabilities /= total[:, np.newaxis]
probabilities = np.divide(probabilities, total[:, np.newaxis])

return outputs, probabilities

Expand Down

0 comments on commit 1c9c5cf

Please sign in to comment.