Skip to content

Commit 042d7df

Browse files
authored
Update materialize.py
1 parent 7287433 commit 042d7df

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

openmoc/materialize.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ def _get_domain(domains, domain_spec):
4141
def _get_numpy_array(hdf5_group, key, suffix):
4242
"""A helper routine to ensure that MGXS data is a proper NumPy array"""
4343

44-
sigma = np.array(hdf5_group['{}/'.format(key) + suffix][...])
44+
try:
45+
sigma = np.array(hdf5_group['{}/'.format(key) + suffix][...])
46+
except:
47+
sigma = np.array(hdf5_group['{}/'.format(key) + suffix]['average'])
4548
sigma = np.atleast_1d(sigma)
4649
sigma = sigma.flatten()
4750
return sigma

0 commit comments

Comments
 (0)