diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index e9ce00254d..968504a06d 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -789,10 +789,8 @@ class MGXS(object): std_dev = np.sqrt(std_dev) # Reshape condensed data arrays with one dimension for all filters - new_shape = \ - (tally.num_filter_bins, tally.num_nuclides, tally.num_scores,) - mean = np.reshape(mean, new_shape) - std_dev = np.reshape(std_dev, new_shape) + mean = np.reshape(mean, tally.shape) + std_dev = np.reshape(std_dev, tally.shape) # Override tally's data with the new condensed data tally._mean = mean @@ -873,10 +871,8 @@ class MGXS(object): domain_filter.num_bins = 1 # Reshape averaged data arrays with one dimension for all filters - new_shape = \ - (tally.num_filter_bins, tally.num_nuclides, tally.num_scores,) - mean = np.reshape(mean, new_shape) - std_dev = np.reshape(std_dev, new_shape) + mean = np.reshape(mean, tally.shape) + std_dev = np.reshape(std_dev, tally.shape) # Override tally's data with the new condensed data tally._mean = mean diff --git a/openmc/tallies.py b/openmc/tallies.py index 8764e2e17c..3a8f102ce3 100644 --- a/openmc/tallies.py +++ b/openmc/tallies.py @@ -2841,12 +2841,6 @@ class Tally(object): new_tally = copy.deepcopy(self) new_tally.add_filter(new_filter) - # Determine the shape of data in the new diagonalized Tally - num_filter_bins = new_tally.num_filter_bins - num_nuclides = new_tally.num_nuclides - num_scores = new_tally.num_scores - new_shape = (num_filter_bins, num_nuclides, num_scores) - # Determine "base" indices along the new "diagonal", and the factor # by which the "base" indices should be repeated to account for all # other filter bins in the diagonalized tally