Skip to main content

Primitive

Module: opytimizer.core.graph.primitive

An internal (function) node: applies function over arity typed children and produces a value of output_type.

Constructor​

Primitive(name: str, function: Callable[..., Any], input_types: Tuple[Type, ...], output_type: Type) -> None

Parameters​

ParameterTypeDefaultDescription
namestrDisplay name.
functionCallable[..., Any]Callable applied to the evaluated children.
input_typesTuple[Type, ...]Expected type of each child, in order.
output_typeTypeType produced by function.