From 5169f4df577a14ad730fda4653bd12447e09908a Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Wed, 16 Mar 2022 12:22:21 -0500 Subject: [PATCH] PEP8 updates --- openmc/weight_windows.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openmc/weight_windows.py b/openmc/weight_windows.py index c9c9be316..df716498c 100644 --- a/openmc/weight_windows.py +++ b/openmc/weight_windows.py @@ -475,7 +475,8 @@ def wwinp_to_wws(path): elif nr == 10: # read rectilinear data: # number of coarse mesh bins and mesh type - ncx, ncy, ncz, nwg = [int(x) for x in np.fromstring(wwinp.readline(), sep=' ')] + ncx, ncy, ncz, nwg = \ + [int(x) for x in np.fromstring(wwinp.readline(), sep=' ')] else: raise RuntimeError(f'Invalid mesh description (nr) found: {nr}') @@ -523,9 +524,11 @@ def wwinp_to_wws(path): np.insert(time_bounds, (0,), (0.0,)) start_idx = end_idx - # read energy boundaries and convert from MeV to eV + # read energy boundaries end_idx = start_idx + ne[p] - energy_bounds = 1e6 * np.insert(ww_data[start_idx:end_idx], (0,), (0.0,)) + energy_bounds = np.insert(ww_data[start_idx:end_idx], (0,), (0.0,)) + # convert from MeV to eV + energy_bounds *= 1e6 start_idx = end_idx # read weight window values