gEconpy.model.compile.pop_return_wrapper#
- gEconpy.model.compile.pop_return_wrapper(f)#
Wrap a function that (potentially) returns a list of numpy arrays to instead return the 0th element of the output.
When the output of a function created by
sympy.lambdify()is a single value, it is still returned as a list of one element. This wrapper removes the list wrapper around scalar outputs.- Parameters:
- f: Callable
The function to wrap
- Returns:
- inner:
Callable The wrapped function
- inner: