2.3.3. sdepy.poisson_source

class sdepy.poisson_source(*, paths=1, vshape=(), dtype=<class 'int'>, lam=1.0)[source]

dn, a source of Poisson process increments.

Parameters:
paths : int

Number of paths (last dimension) of the source realizations.

vshape : tuple of int

Shape of source values.

dtype : data-type

Data type of source values. Defaults to int.

lam : array-like, or callable

Intensity of the Poisson process, possibly time-dependent. Should be an array of non-negative values, broadcastable to shape vshape + (paths,), or a callable with lam(t) evaluating to such array.

Returns:
array

Once instantiated as dn, dn(t, dt) returns a random realization of Poisson process increments from time t to time t + dt, with shape (t + dt).shape + vshape + (paths,). The increments are independent Poisson variates with mean lam*dt, or lam(t + dt/2)*dt (the latter approximates the integral of lam(t) from t to t + dt).

See also

source
Attributes:
size

Returns the number of stored scalar values from previous evaluations, or 0 for sources without memory.

t

Returns a copy of the time points at which source values have been stored from previous evaluations, as an array, or an empty array for sources without memory.

Methods

__call__(t, dt) See poisson_source class documentation.