Modifier#
The available modifiers:
|
Modify function to iterate one given parameter. |
|
Modify function to iterate the parameters pairwise. |
|
Profile the execution time of a function. |
modifier
module#
- mmodel.modifier.format_time(dt, precision)[source]#
Format time in seconds to a human-readable string.
- mmodel.modifier.loop_input(parameter: str)[source]#
Modify function to iterate one given parameter.
- Parameters:
parameter (list) – target parameter to loop The target parameter name is changed to f”{param}_loop”
- mmodel.modifier.profile_time(number=1, repeat=1, verbose=False, precision=2)[source]#
Profile the execution time of a function.
The modifier behaves similarly to the timeit module. However, the modifier does not suppress garbage collection during the function execution; therefore, the result might be slightly different.