From 17be0257a0ec05994ff6d2a2fea8edcd15b5dfc7 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Tue, 5 Apr 2022 14:05:35 -0500 Subject: [PATCH] Correction to histogram cdf method --- openmc/stats/univariate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmc/stats/univariate.py b/openmc/stats/univariate.py index 3d99f8b8ce..7fc479e630 100644 --- a/openmc/stats/univariate.py +++ b/openmc/stats/univariate.py @@ -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)