diff --git a/openmc/mesh.py b/openmc/mesh.py index 5a23e83d763..c965ae3b27b 100644 --- a/openmc/mesh.py +++ b/openmc/mesh.py @@ -99,9 +99,7 @@ def from_hdf5(cls, group: h5py.Group): Instance of a MeshBase subclass """ - - mesh_type = 'regular' if 'type' not in group else group['type'][()].decode() - + mesh_type = 'regular' if 'type' not in group.attrs else group.attrs['type'].decode() mesh_id = int(group.name.split('/')[-1].lstrip('mesh ')) mesh_name = '' if not 'name' in group else group['name'][()].decode()