From cc295001ff2812b7b4b36072c98be963be03adf9 Mon Sep 17 00:00:00 2001 From: Zhuoran Han Date: Fri, 17 Aug 2018 16:39:56 -0500 Subject: [PATCH] Fixed a minor bug --- openmc/polynomial.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/openmc/polynomial.py b/openmc/polynomial.py index 7264524cbc..d26d7edf83 100644 --- a/openmc/polynomial.py +++ b/openmc/polynomial.py @@ -3,8 +3,11 @@ import openmc import openmc.capi as capi -def legendre_from_expcoef(coef, domain): - """Return a Legendre object +def legendre_from_expcoef(coef, domain= [-1,1]): + """Return a Legendre object. + + Given a list of coefficients from FET tally and a array of down, return + the numpy Legendre object. Parameters ---------- @@ -19,7 +22,8 @@ def legendre_from_expcoef(coef, domain): A numpy Legendre series object """ - n = np.arange(len(coef) + 1) + + n = np.arange(len(coef)) c = (2*n + 1) * np.asarray(coef) / (domain[1] - domain[0]) return np.polynomial.Legendre(c, domain)