gEconpy.model.compile.compile_to_numpy#
- gEconpy.model.compile.compile_to_numpy(inputs, outputs, cache, stack_return, pop_return, **kwargs)#
Convert a sympy function to a numpy function using
sympy.lambdify().- Parameters:
- inputs: list[sp.Symbol]
The inputs to the function.
- outputs: list[Union[sp.Symbol, sp.Expr]]
The outputs of the function.
- cache: dict
Mapping between sympy variables and pytensor variables. Ignored by this function; included for compatibility with other compile functions.
- stack_return: bool
If True, the function will return a single numpy array with all outputs. Otherwise it will return a list of numpy arrays.
- pop_return: bool
If True, the function will return only the 0th element of the output. Used to remove the list wrapper around single-output functions.
- kwargs: dict
Ignored, included for compatibility with other compile functions.
- Returns:
- f:
Callable The compiled function.
- cache:
dict Pytensor caching information.
- f: