2.3.16. sdepy.rvmap

sdepy.rvmap(f, y)[source]

Map f to random variates of distribution y, possibly time-dependent.

Parameters:
f : callable

Callable with signature f(y), or f(t, y) or f(s, y), to be mapped to the random variates of y or y(t)

y : distribution, or callable

Distribution, possibly time-dependent, as accepted by cpoisson_source.

Returns:
new_y : Distribution, or callable

An object with and rvs(shape) method, or a callable with new_y(t) evaluating to such object, as accepted by cpoisson_source. new_y.rvs(shape), or new_y(t).rvs(shape), returns f(y.rvs(shape)), or f([t, ] y(t).rvs(shape).

Notes

new_y does not provide any mean, std, var, exp_mean method.

To be recognized as time-dependent, f should have its first parameter named t or s.