Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
bounds.reshape doesn't modify bounds it returns a new array
  • Loading branch information
eepeterson committed Oct 24, 2022
commit a9933c5ecf948bcbfbadb4b03156e5c2db2e5822
8 changes: 4 additions & 4 deletions openmc/weight_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ def lower_ww_bounds(self, bounds):
# 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
Expand All @@ -225,9 +225,9 @@ def upper_ww_bounds(self, bounds):
# 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
Expand Down