Skip to content

decorators

alias_param

alias_param(func: Callable = None, **aliases)

Alias a function with the given keyword arguments. If the original keyword argument is not given or is None but the alias is given and is not None, then the original keyword argument will be set to the value of the alias.

Notes

The priority of the original keyword argument is higher than the alias, priority of the alias is corresponding to the order of the given keyword arguments.

PARAMETER DESCRIPTION
func

Function to be aliased, by default None

TYPE: Callable DEFAULT: None

aliases

Keyword arguments to be aliased, keyword is the alias and value is the original keyword

DEFAULT: {}

inherit_docstring

inherit_docstring(
    func: Callable | Type = None,
    *,
    source: Callable | Type = None,
    style: Literal["numpy", "google"] = "numpy"
)

Decorator for inherit docstring from other functions.

jit

jit(
    signature_or_function: Type | Callable = None,
    locals: Dict[str, ...] = None,
    cache: bool = False,
    pipeline_class: Type["CompilerBase"] = None,
    boundscheck: bool = None,
    **options
)

Decorator for numba.jit when numba is the backend.

jitclass

jitclass(
    cls_or_spec: Type | List[Tuple[str, Type]] | Dict[str, Type] = None,
    spec: List[Tuple[str, Type]] | Dict[str, Type] = None,
)

Decorator for numba.experimental.jitclass when numba is the backend.

njit

njit(signature_or_function: Type | Callable = None, *args, **kwargs)

Decorator for numba.njit when numba is the backend.