mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Correction to histogram cdf method
This commit is contained in:
parent
136ff45cc5
commit
17be0257a0
1 changed files with 1 additions and 1 deletions
|
|
@ -889,7 +889,7 @@ class Tabular(Univariate):
|
|||
x = np.asarray(self.x)
|
||||
p = np.asarray(self.p)
|
||||
if self.interpolation == 'histogram':
|
||||
c[1:] = p * np.diff(x)
|
||||
c[1:] = p[:-1] * np.diff(x)
|
||||
elif self.interpolation == 'linear-linear':
|
||||
c[1:] = 0.5 * (p[0:-1] + p[1:]) * np.diff(x)
|
||||
return np.cumsum(c)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue