yatsm.accel module

Decorator try_jit accelerates computation via Numba, when available

yatsm.accel.try_jit(*args, **kwargs)[source]

Apply numba.jit to function f if Numba is available

Accepts arguments to Numba jit function (signature, nopython, etc.).

Examples:

@try_jit
@try_jit()
@try_jit(nopython=True)
@try_jit("float32[:](float32[:], float32[:])", nopython=True)