Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
jeetsukumaran committed Aug 24, 2024
1 parent 24c2bdd commit f99cec7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dendropy/simulate/treesim.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ def rand_trees(
for rep_idx in range(n_replicates):
if rng is None:
rng = random.Random()
if callable(model_kwargs):
model_kwargs_data = model_kwargs(rep_idx, rng)
elif isinstance(model_kwargs, collections.abc.Mapping):
if isinstance(model_kwargs, collections.abc.Mapping):
model_kwargs_data = model_kwargs
elif callable(model_kwargs):
model_kwargs_data = model_kwargs(rep_idx, rng)
elif not isinstance(model_kwargs, str):
# raise ValueError(f"Assuming `model_kwargs` as iterable of keyword maps: expecting same number of model keyword maps ({len(model_kwargs)}) as number of replicates ({n_replicates})")
for model_kwargs_data in model_kwargs:
Expand Down

0 comments on commit f99cec7

Please sign in to comment.