mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Merge pull request #2386 from bam241/map_no_kargs
map does not accept keyword argument, fixing PR #2356
This commit is contained in:
commit
b9d4ed2a28
1 changed files with 4 additions and 4 deletions
|
|
@ -15,7 +15,7 @@ USE_MULTIPROCESSING = True
|
|||
NUM_PROCESSES = None
|
||||
|
||||
|
||||
def deplete(func, chain, x, rates, dt, matrix_func=None, **func_args):
|
||||
def deplete(func, chain, x, rates, dt, matrix_func=None, *matrix_args):
|
||||
"""Deplete materials using given reaction rates for a specified time
|
||||
|
||||
Parameters
|
||||
|
|
@ -37,8 +37,8 @@ def deplete(func, chain, x, rates, dt, matrix_func=None, **func_args):
|
|||
``fission_yields = {parent: {product: yield_frac}}``
|
||||
Expected to return the depletion matrix required by
|
||||
``func``
|
||||
func_args : dict
|
||||
Remaining keyword arguments passed to matrix_func when used
|
||||
matrix_args : Any, optional
|
||||
Additional arguments passed to matrix_func
|
||||
|
||||
Returns
|
||||
-------
|
||||
|
|
@ -60,7 +60,7 @@ def deplete(func, chain, x, rates, dt, matrix_func=None, **func_args):
|
|||
matrices = map(chain.form_matrix, rates, fission_yields)
|
||||
else:
|
||||
matrices = map(matrix_func, repeat(chain), rates, fission_yields,
|
||||
**func_args)
|
||||
*matrix_args)
|
||||
|
||||
inputs = zip(matrices, x, repeat(dt))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue