From 793f4e22ba0f7ab87e5e187f64fb2a33abb0263e Mon Sep 17 00:00:00 2001 From: Daniel Otto de Mentock Date: Wed, 27 Apr 2022 17:29:19 +0200 Subject: [PATCH] renamed func argument to _job_pointwise function to provided_func to avoid overlap with func argument of functools.partial function --- python/damask/_result.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/damask/_result.py b/python/damask/_result.py index 5d8f2f668..143c466aa 100644 --- a/python/damask/_result.py +++ b/python/damask/_result.py @@ -1402,7 +1402,7 @@ class Result: def _job_pointwise(self, group: str, - func: Callable, + provided_func: Callable, datasets: Dict[str, str], args: Dict[str, str], lock: LockBase) -> List[Union[None, Any]]: @@ -1418,7 +1418,7 @@ class Result: 'meta': {k:(v.decode() if not h5py3 and type(v) is bytes else v) \ for k,v in loc.attrs.items()}} lock.release() - r = func(**datasets_in,**args) + r = provided_func(**datasets_in,**args) return [group,r] except Exception as err: print(f'Error during calculation: {err}.') @@ -1459,7 +1459,7 @@ class Result: print('No matching dataset found, no data was added.') return - default_arg = partial(self._job_pointwise,func=func,datasets=datasets,args=args,lock=lock) + default_arg = partial(self._job_pointwise,provided_func=func,datasets=datasets,args=args,lock=lock) for group,result in util.show_progress(pool.imap_unordered(default_arg,groups),len(groups)): #type: ignore if not result: