Skip to content

Commit

Permalink
Closed hdf5_file [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
Michele Simionato committed Jan 31, 2025
1 parent 2826b75 commit a27fa6e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions openquake/hazardlib/gsim/aristeidou_2024.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,10 @@ class AristeidouEtAl2024(GMPE):
def __init__(self):
# Load background information about the model from a hdf5 file
# (i.e., weight, biases, standard devation values, etc.)
hdf5_file = h5py.File(ASSET_DIR / "gmm_ann.hdf5", 'r')
self.DATA = {}
for key in hdf5_file.keys():
self.DATA[key] = load_hdf5_to_list(hdf5_file[key])
with h5py.File(ASSET_DIR / "gmm_ann.hdf5", 'r') as h5:
self.DATA = {}
for key in h5:
self.DATA[key] = load_hdf5_to_list(h5[key])

def compute(self, ctx: np.recarray, imts, mean, sig, tau, phi):
"""
Expand Down

0 comments on commit a27fa6e

Please sign in to comment.