Node#

Node module#

class mmodel.node.Node(*args, **kwargs)[source]#

Bases: EditMixin, ReprMixin

A node class that formats node function and metadata.

convert_func(func, inputs_list)[source]#

Convert function to a node function.

To replace the positional or positional-or-keyword parameters, the inputs_list needs to be defined. The user can select desired keyword-only parameters after “*” in the input. To replace the keyword-only parameters, a custom function needs to be defined.

For functions that already fit the criteria and have no argument list, we still wrap the function. The overhead is minimal.

edit(**kwargs)[source]#

Edit node.

A new node object is created.

property inputs#

Return a copy of inputs.

property modifiers#

Return a copy of modifiers.

property node_func#

Return node function, the node function cannot be reset.

property signature#

Return signature.