Skip to content

Commit

Permalink
Convert probabilities to float64
Browse files Browse the repository at this point in the history
  • Loading branch information
chvogl committed Nov 10, 2023
1 parent f12775d commit a9398ed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tardis/plasma/properties/transition_probabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def normalize_trans_probs(p):
all probabilites with the same source_level_idx sum to one.
Indexed by source_level_idx, destination_level_idx.
"""
p = p.astype(np.float64)
p_summed = p.groupby(level=0).sum()
p_summed[p_summed == 0] = 1
index = p.index.get_level_values("source_level_idx")
Expand Down

0 comments on commit a9398ed

Please sign in to comment.