Skip to content

Latest commit

 

History

History
36 lines (19 loc) · 1.26 KB

concrete.fhe.extensions.univariate.md

File metadata and controls

36 lines (19 loc) · 1.26 KB

module concrete.fhe.extensions.univariate

Declaration of univariate function.


function univariate

univariate(
    function: Callable[[Any], Any],
    outputs: Optional[BaseDataType, Type[ScalarAnnotation]] = None
) → Callable[[Union[Tracer, Any]], Union[Tracer, Any]]

Wrap a univariate function so that it is traced into a single generic node.

Args: function (Callable[[Any], Any]): univariate function to wrap

outputs (Optional[Union[BaseDataType, Type[ScalarAnnotation]]], default = None): data type of the result, unused during compilation, required for direct definition

Returns: Callable[[Union[Tracer, Any]], Union[Tracer, Any]]: another univariate function that can be called with a Tracer as well