From 43033b656c03ac96e40f9effc5b4b8d9e17602d1 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Thu, 27 Oct 2022 14:47:16 -0500 Subject: [PATCH] Returning a tuple for RegularMesh.dimension --- openmc/mesh.py | 2 +- openmc/weight_windows.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openmc/mesh.py b/openmc/mesh.py index d4db5011ba..72b0210666 100644 --- a/openmc/mesh.py +++ b/openmc/mesh.py @@ -324,7 +324,7 @@ class RegularMesh(StructuredMesh): @property def dimension(self): - return self._dimension + return tuple(self._dimension) @property def n_dimension(self): diff --git a/openmc/weight_windows.py b/openmc/weight_windows.py index 44de640412..cf5a62cc1e 100644 --- a/openmc/weight_windows.py +++ b/openmc/weight_windows.py @@ -370,7 +370,7 @@ class WeightWindows(IDManagerMixin): particle_type = get_text(elem, 'particle_type') survival_ratio = float(get_text(elem, 'survival_ratio')) - ww_shape = (len(e_bounds) - 1,) + tuple(mesh.dimension[::-1]) + ww_shape = (len(e_bounds) - 1,) + mesh.dimension[::-1] lower_ww_bounds = np.array(lower_ww_bounds).reshape(ww_shape).T upper_ww_bounds = np.array(upper_ww_bounds).reshape(ww_shape).T