Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 5, 2024
1 parent a829b73 commit 8c13250
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions appletree/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,11 @@ def __init__(self, instruct, par_config=None):

@classmethod
def from_backend(cls, backend_h5_file_name):
"""
Initialize context from a backend_h5 file.
"""
"""Initialize context from a backend_h5 file."""
with h5py.File(get_file_path(backend_h5_file_name)) as file:
instruct = eval(file['mcmc'].attrs['instruct'])
nwalkers = file['mcmc'].attrs['nwalkers']
batch_size = file['mcmc'].attrs['batch_size']
instruct = eval(file["mcmc"].attrs["instruct"])
nwalkers = file["mcmc"].attrs["nwalkers"]
batch_size = file["mcmc"].attrs["batch_size"]
tree = cls(instruct)
tree.pre_fitting(nwalkers, batch_size=batch_size)
return tree
Expand Down

0 comments on commit 8c13250

Please sign in to comment.