meshed.composition#
Specific use of FuncNode and DAG
Functions
|
|
|
|
|
Find the name of the parameter of a function with exactly one parameter. |
Returns True iff the only required params of func are FuncNode field names. |
|
|
Emulate a Line object with a DAG |
|
- meshed.composition.get_param(func)[source]#
Find the name of the parameter of a function with exactly one parameter. Raise an error if more or less parameters.
- Parameters:
func – callable, the function to inspect
- Returns:
str, the name of the single parameter of func
- meshed.composition.is_func_node_kwargs_trans(func)[source]#
Returns True iff the only required params of func are FuncNode field names. This ensures that the func will be able to be bound to FuncNode fields and therefore used as a func_node (kwargs) transformer.
- Return type:
- meshed.composition.line_with_dag(*steps)[source]#
Emulate a Line object with a DAG
- Parameters:
steps – an iterable of callables, the steps of the pipeline. Each step should have exactly one parameter and the output of each step is fed into the next
- Returns:
a DAG instance computing the composition of all the functions in steps, in the provided order