We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7287433 + 042d7df commit c9ac4e1Copy full SHA for c9ac4e1
openmoc/materialize.py
@@ -41,7 +41,10 @@ def _get_domain(domains, domain_spec):
41
def _get_numpy_array(hdf5_group, key, suffix):
42
"""A helper routine to ensure that MGXS data is a proper NumPy array"""
43
44
- sigma = np.array(hdf5_group['{}/'.format(key) + suffix][...])
+ try:
45
+ sigma = np.array(hdf5_group['{}/'.format(key) + suffix][...])
46
+ except:
47
+ sigma = np.array(hdf5_group['{}/'.format(key) + suffix]['average'])
48
sigma = np.atleast_1d(sigma)
49
sigma = sigma.flatten()
50
return sigma
0 commit comments