mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
avoiding true divide erorr
This commit is contained in:
parent
8a5a520106
commit
e6d8e3f4a7
1 changed files with 1 additions and 2 deletions
|
|
@ -1352,8 +1352,7 @@ class EnergyFilter(RealFilter):
|
|||
Tabular distribution with histogram interpolation
|
||||
"""
|
||||
|
||||
probabilities = np.array(values)
|
||||
probabilities /= probabilities.sum()
|
||||
probabilities = np.array(values) / sum(values)
|
||||
|
||||
probability_per_ev = probabilities / np.diff(self.values)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue