- sakkara.model.f_(fct: Callable)#
Wraps a generic function with associated Sakkara components. After wrapped with this, inputs can be a subclass of
ModelComponentor any other type (which will be wrapped withUnrepeatableComponent)Example
import pymc as pm from sakkara.model import DistributionComponent as DC, f def g(a,b): return a + b comp = DC(pm.Normal) # Wrap g with f, pass arguments as we would have done directly to g res = f(g)(comp, 100) # res corresponds to N(0, 1) + 100