Removed manual tuple construction for tally shape in place of new shape property

This commit is contained in:
wbinventor@gmail.com 2016-01-04 19:40:49 -05:00
parent f62b057cfb
commit 38676476c3
2 changed files with 4 additions and 14 deletions

View file

@ -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

View file

@ -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