Skip to content

Commit

Permalink
Merge pull request #77 from levolz/Development
Browse files Browse the repository at this point in the history
bugfix inheritance in simulation.py
  • Loading branch information
stefanradev93 committed Jun 22, 2023
2 parents fba2eae + 7b2820f commit 29f0b95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bayesflow/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,15 +736,15 @@ def __init__(
parameters or on single parameter vectors via tha `simulator_is_batched` argument.
"""

if type(prior) is not Prior:
if not isinstance(prior, Prior):
prior_args = {"batch_prior_fun": prior} if prior_is_batched else {"prior_fun": prior}
self.prior = Prior(**prior_args)
self.prior_is_batched = prior_is_batched
else:
self.prior = prior
self.prior_is_batched = prior_is_batched
self.prior_is_batched = self.prior.is_batched

if type(simulator) is not Simulator:
if not isinstance(simulator, Simulator):
self.simulator = self._config_custom_simulator(simulator, simulator_is_batched)
else:
self.simulator = simulator
Expand Down

0 comments on commit 29f0b95

Please sign in to comment.