MarkParametrize¶
-
class
cosmo_utils.utils.file_utils.MarkParametrize(argname, argvalues)[source] [edit on github]¶ Bases:
objectParametrizes a set of values and changes the input variables of a function.
Initializes class object.
Parameters: argname :
strKey of the element to change in main dictionary. It can only contain 1 word at a time.
argvalues : array-like
List of argvalues for each of the
argnames. This list will be used to loop over the values and replace them into the main dictionary.Notes
This function loops over the many different elements in
argvalues. This function is meant to be used as adecoratorfor some function whose input a dictionary.Methods Summary
__call__(func)This function gets executed when calling the function. Methods Documentation
-
__call__(func)[source] [edit on github]¶ This function gets executed when calling the function. This functions changes the value of arguments in
p_dict, and runs the functionfuncwith the given parameters.Parameters: func :
functionFunction that will be decorated.
-