[45ad7e]: / singlecellmultiomics / utils / poolutils.py

Download this file

13 lines (10 with data), 313 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
def pool_wrapper(args):
"""
Wraps a function, so it can be natively called from a Pool
Args:
f, kwargs : f is the function to call, kwargs a dictionary of arguments to pass to f
Returns:
return value of f called with **kwargs
"""
f, kwargs = args
return f(**kwargs)