def _make_rng_numba_func(func):
"""
Make a Numba'd version of a function to draw random numbers.
Parameters
----------
func : function
Function with call signature `func(*args, size=1)`.
Returns
-------
output : Numba'd function
A Numba'd version of the functon
Notes
-----
.. If the function is Numba'able in nopython mode, it will compile
in that way. Otherwise, falls back to object mode.
"""
# @numba.jit
def f(args, size=1):
all_args = args + (size,)
return func(*all_args)
return f
# @numba.jit(nopython=True)
评论列表
文章目录