freealg.distributions.DeformedMarchenkoPastur.roots#
- DeformedMarchenkoPastur.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
zis scalar, returned array is of the shape(r+1,).If
zis array-like, returned array if of shapez.shape + (r+1,).
Examples
>>> import numpy >>> from freealg.distributions import DeformedMarchenkoPastur >>> dmp = DeformedMarchenkoPastur(t=[2.0, 5.5], w=[0.75, 1-0.75], ... c=0.1) >>> z = numpy.linspace(0, 2, 10) + 2.0j >>> r = dmp.roots(z)