freealg.distributions.CompoundFreePoisson.roots#

CompoundFreePoisson.roots(z)#

Roots of polynomial implicitly representing Stieltjes transform

Parameters:
zcomplex or numpy.ndarray

A complex scalar or a 1D or 2D array of query points.

Returns:
rnumpy.ndarray

Roots of polynomial with the following array shape:

  • If z is scalar, returned array is of the shape (r+1,).

  • If z is array-like, returned array if of shape z.shape + (r+1,).

See also

stieltjes
poly

Examples

>>> import numpy
>>> from freealg.distributions import CompoundFreePoisson

>>> # Create an object of the class
>>> cfp = CompoundFreePoisson(t=[2.0, 5.5], w=[0.75, 1-0.75],
...    lam=0.1)

>>> z = numpy.linspace(0, 2, 10) + 2.0j
>>> r = cfp.roots(z)