Templating
Wrappers, decorators and utilities for constructing expression templates.
Functions
def assemble(f)
-
def generator(dim: Union[int, Tuple[Tuple[int, int]]] = None, statevar: str = 'state', main: str = 'main', jacx: str = 'jacx', form: str = 'x,y,s=s,p=p,**e->x,y,s', params: str = 'params', dimvar: str = None, origin: tuple = None, order: int = 0, **kwargs) ‑> Callable
-
Decorator that wraps a basic local map generator.
Attributes
origin
: A structure containing arguments which may act as an ‘origin’ for the target function.shape
: tuple Description of the shape of the dual and primal spaces.Generated Arguments
_expose_closure
: bool- Expose closed-over local variables as an attribute.
_jit
: bool- If
True
{.python}, JIT-compiles the target function
Studies
def generator_no2()
-
def F(): name = “my-element” def main(x, y, state, **kwds, _name=name): pass
def get_unspecified_parameters(func, recurse=False)
-
created 2021-03-31
def serialize(f)
-
Requires JAX
def template(dim: Union[int, Tuple[Tuple[int, int]]] = None, statevar: str = 'state', main: str = 'main', jacx: str = 'jacx', form: str = 'x,y,s=s,p=p,**e->x,y,s', params: str = 'params', dimvar: str = None, origin: tuple = None, order: int = 0, **kwargs) ‑> Callable
-
Decorator that wraps a basic local map generator.
Attributes
origin
: A structure containing arguments which may act as an ‘origin’ for the target function.shape
: tuple Description of the shape of the dual and primal spaces.Generated Arguments
_expose_closure
: bool- Expose closed-over local variables as an attribute.
_jit
: bool- If
True
{.python}, JIT-compiles the target function
Studies
def wrap(f, *args, **kwds)
-
Wrap a pre-defined function to act as a local dual map.
Classes
class Dual
-