From a9933c5ecf948bcbfbadb4b03156e5c2db2e5822 Mon Sep 17 00:00:00 2001 From: Ethan Peterson Date: Mon, 24 Oct 2022 13:23:15 -0400 Subject: [PATCH] bounds.reshape doesn't modify bounds it returns a new array --- openmc/weight_windows.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openmc/weight_windows.py b/openmc/weight_windows.py index eb30e838a..7e5f41bb1 100644 --- a/openmc/weight_windows.py +++ b/openmc/weight_windows.py @@ -206,9 +206,9 @@ class WeightWindows(IDManagerMixin): # reshape data according to mesh and energy bins bounds = np.asarray(bounds) if isinstance(self.mesh, UnstructuredMesh): - bounds.reshape(-1, self.num_energy_bins) + bounds = bounds.reshape(-1, self.num_energy_bins) else: - bounds.reshape(*self.mesh.dimension, self.num_energy_bins) + bounds = bounds.reshape(*self.mesh.dimension, self.num_energy_bins) self._lower_ww_bounds = bounds @property @@ -225,9 +225,9 @@ class WeightWindows(IDManagerMixin): # reshape data according to mesh and energy bins bounds = np.asarray(bounds) if isinstance(self.mesh, UnstructuredMesh): - bounds.reshape(-1, self.num_energy_bins) + bounds = bounds.reshape(-1, self.num_energy_bins) else: - bounds.reshape(*self.mesh.dimension, self.num_energy_bins) + bounds = bounds.reshape(*self.mesh.dimension, self.num_energy_bins) self._upper_ww_bounds = bounds @property