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)
, orf(t, y)
orf(s, y)
, to be mapped to the random variates ofy
ory(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 withnew_y(t)
evaluating to such object, as accepted bycpoisson_source
.new_y.rvs(shape)
, ornew_y(t).rvs(shape)
, returnsf(y.rvs(shape))
, orf([t, ] y(t).rvs(shape)
.
See also
Notes
new_y
does not provide anymean, std, var, exp_mean
method.To be recognized as time-dependent,
f
should have its first parameter namedt
ors
.