diff --git a/lollipop/cli/deconvolute.py b/lollipop/cli/deconvolute.py index b827b88..f6820c1 100755 --- a/lollipop/cli/deconvolute.py +++ b/lollipop/cli/deconvolute.py @@ -3,7 +3,7 @@ """Implements the deconvolute command for the lollipop CLI.""" import sys -from typing import List, Tuple, Union +from typing import List, Tuple, Union, TypedDict import logging import time import multiprocessing @@ -65,13 +65,13 @@ def _deconvolute_bootstrap_wrapper(args): handling the random number generator seeding. """ - # Unpack the arguments - *other_args, child_seed = args + # Get the seed + child_seed = args.pop("child_seed") # Initialize the default random number generator with the child seed np.random.default_rng(child_seed) - return _deconvolute_bootstrap(*other_args) + return _deconvolute_bootstrap(**args) def _deconvolute_bootstrap( @@ -663,28 +663,28 @@ def deconvolute( # iterate over locations # Create delayed objects for each location args_list = [ - ( - n_cores, - location, - loc_df, - bootstrap, - locations_list, - no_loc, - no_date, - date_intervals, - var_dates, - kernel, - kernel_params, - regressor, - regressor_params, - confint, - confint_params, - deconv_params, - have_confint, - confint_name, - namefield, - child_seed, - ) + { + "n_cores" : n_cores, + "location" : location, + "loc_df" : loc_df, + "bootstrap" : bootstrap, + "locations_list" : locations_list, + "no_loc" : no_loc, + "no_date" : no_date, + "date_intervals" : date_intervals, + "var_dates" : var_dates, + "kernel" : kernel, + "kernel_params" : kernel_params, + "regressor" : regressor, + "regressor_params" : regressor_params, + "confint" : confint, + "confint_params" : confint_params, + "deconv_params" : deconv_params, + "have_confint" : have_confint, + "confint_name" : confint_name, + "namefield" : namefield, + "child_seed" : child_seed, + } for location, loc_df, child_seed in zip(locations_list, loc_dfs, seeds) ]