transonic.signatures

Compute function signatures

Internal API

transonic.signatures._format_types_as_backend_types(types, backend_type_formatter, **kwargs)[source]

Compute a list of Pythran/Cython/… types

transonic.signatures.compute_signatures_from_typeobjects(types_in, backend_type_formatter) List[List[str]][source]

Compute a list of lists (signatures) of strings (backend types)

transonic.signatures._make_signature_from_template_variables(func, backend_type_formatter, _signature=None, as_list_str=False, **kwargs)[source]

Create signature for a function with values for the template types

(This function should only be used in make_signatures_from_typehinted_func())

Parameters:
func: a function
kwargsdict

The template types and their value

transonic.signatures.make_signatures_from_typehinted_func(func, backend_type_formatter, as_list_str=False)[source]

Make the signatures from annotations if it is possible

Useful when there are only “not templated” types.

Functions

compute_signatures_from_typeobjects(...)

Compute a list of lists (signatures) of strings (backend types)

make_signatures_from_typehinted_func(func, ...)

Make the signatures from annotations if it is possible