Function (class)

A function distribution consisting of some callable function along with args/kwargs which can each be other Distribution objects.

For example:

def func(a, b, c=1, d=5):
return a*b + c*d

a = distl.gaussian(10, 2)
b = distl.uniform(3, 5)
d = 6
f = distl.function(func, args=(a, b), kwargs={'d': d}, vectorized=True)
print(f)

Note: using Function.to_file or from_file requires the dill package to be installed.

Treatment "under-the-hood":