freealg.distributions.FreeLevy.roots#

FreeLevy.roots(z, chunk_size=20000, eps=1e-14)#

Roots of polynomial implicitly representing Stieltjes transform

Parameters:
zarray_like of complex

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

chunk_sizeint, default=20000

Solve in chunks to limit memory. For 200x200 grids, default is fine.

epsfloat, default=1e-14

Tolerance for trimming leading zeros.

Returns:
rootsndarray

Shape z.shape + (deg,), where deg is the polynomial degree in m.

  • 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 FreeLevy

>>> # Create an object of the class
>>> fl = FreeLevy(t=[2.0, 5.5], w=[0.75, 1-0.75], lam=0.1, a=0,
...               sigma=0.9)

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