Compile#

compile_function(inputs, outputs, backend[, ...])

Dispatch compilation of a sympy function to one of three possible backends: numpy, or pytensor.

compile_to_numpy(inputs, outputs, cache, ...)

Convert a sympy function to a numpy function using sympy.lambdify().

compile_to_pytensor_function(inputs, ...)

Convert a sympy function to a pytensor function using pytensor.function().

Function Wrappers#

dictionary_return_wrapper(f, outputs)

Wrap a function that returns a numpy array to instead return a SymbolDictionary.

stack_return_wrapper(f)

Wrap a function to return a single numpy array with all outputs stacked into a single flat array.

pop_return_wrapper(f)

Wrap a function that (potentially) returns a list of numpy arrays to instead return the 0th element of the output.

array_return_wrapper(f)

Wrap a function to convert the output to a numpy array.