freealg 0.7.9__tar.gz → 0.7.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {freealg-0.7.9 → freealg-0.7.10}/PKG-INFO +1 -1
- freealg-0.7.10/freealg/__version__.py +1 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_algebraic_form/_decompress.py +1 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_algebraic_form/_homotopy.py +5 -5
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_algebraic_form/_moments.py +43 -25
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_algebraic_form/algebraic_form.py +17 -14
- {freealg-0.7.9 → freealg-0.7.10}/freealg.egg-info/PKG-INFO +1 -1
- freealg-0.7.9/freealg/__version__.py +0 -1
- {freealg-0.7.9 → freealg-0.7.10}/AUTHORS.txt +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/CHANGELOG.rst +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/LICENSE.txt +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/MANIFEST.in +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/README.rst +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/__init__.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_algebraic_form/__init__.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_algebraic_form/_constraints.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_algebraic_form/_continuation_algebraic.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_algebraic_form/_decompress2.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_algebraic_form/_discriminant.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_algebraic_form/_edge.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_algebraic_form/_sheets_util.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_free_form/__init__.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_free_form/_chebyshev.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_free_form/_damp.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_free_form/_decompress.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_free_form/_density_util.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_free_form/_jacobi.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_free_form/_linalg.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_free_form/_pade.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_free_form/_plot_util.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_free_form/_sample.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_free_form/_series.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_free_form/_support.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_free_form/free_form.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_geometric_form/__init__.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_geometric_form/_continuation_genus0.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_geometric_form/_continuation_genus1.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_geometric_form/_elliptic_functions.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_geometric_form/_sphere_maps.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_geometric_form/_torus_maps.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_geometric_form/geometric_form.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/_util.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/distributions/__init__.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/distributions/_chiral_block.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/distributions/_deformed_marchenko_pastur.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/distributions/_deformed_wigner.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/distributions/_kesten_mckay.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/distributions/_marchenko_pastur.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/distributions/_meixner.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/distributions/_wachter.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/distributions/_wigner.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/visualization/__init__.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/visualization/_glue_util.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg/visualization/_rgb_hsv.py +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg.egg-info/SOURCES.txt +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg.egg-info/dependency_links.txt +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg.egg-info/not-zip-safe +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg.egg-info/requires.txt +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/freealg.egg-info/top_level.txt +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/pyproject.toml +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/requirements.txt +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/setup.cfg +0 -0
- {freealg-0.7.9 → freealg-0.7.10}/setup.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.7.10"
|
|
@@ -504,6 +504,7 @@ def decompress_newton(z_list, t_grid, a_coeffs, w0_list=None,
|
|
|
504
504
|
ok : ndarray of bool, same shape as W
|
|
505
505
|
Convergence flags from the accepted solve at each point.
|
|
506
506
|
"""
|
|
507
|
+
|
|
507
508
|
z_list = numpy.asarray(z_list, dtype=complex).ravel()
|
|
508
509
|
t_grid = numpy.asarray(t_grid, dtype=float).ravel()
|
|
509
510
|
nt = t_grid.size
|
|
@@ -6,12 +6,12 @@ import numpy
|
|
|
6
6
|
from ._moments import AlgebraicStieltjesMoments
|
|
7
7
|
from tqdm import tqdm
|
|
8
8
|
|
|
9
|
-
__all__ = ['
|
|
9
|
+
__all__ = ['StieltjesPoly']
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
#
|
|
12
|
+
# ===========
|
|
13
13
|
# select root
|
|
14
|
-
#
|
|
14
|
+
# ===========
|
|
15
15
|
|
|
16
16
|
def select_root(roots, z, target):
|
|
17
17
|
"""
|
|
@@ -202,7 +202,7 @@ class StieltjesPoly(object):
|
|
|
202
202
|
|
|
203
203
|
# Iterate over indices so we can pass Python scalars into evaluate()
|
|
204
204
|
if progress:
|
|
205
|
-
indices = tqdm(numpy.ndindex(z_arr.shape),total=z_arr.size)
|
|
205
|
+
indices = tqdm(numpy.ndindex(z_arr.shape), total=z_arr.size)
|
|
206
206
|
else:
|
|
207
207
|
indices = numpy.ndindex(z_arr.shape)
|
|
208
208
|
for idx in indices:
|
|
@@ -265,7 +265,7 @@ class StieltjesPoly(object):
|
|
|
265
265
|
# coeffs = numpy.asarray(poly_coeffs_m(z_val), dtype=numpy.complex128)
|
|
266
266
|
# return numpy.roots(coeffs)
|
|
267
267
|
|
|
268
|
-
# # If user asked
|
|
268
|
+
# # If user asked a real-axis value, interpret as boundary value from C+.
|
|
269
269
|
# if z.imag == 0.0:
|
|
270
270
|
# if eps is None:
|
|
271
271
|
# eps = 1e-8 * max(1.0, abs(z))
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
# =======
|
|
2
|
+
# Imports
|
|
3
|
+
# =======
|
|
4
|
+
|
|
1
5
|
import numpy
|
|
2
6
|
|
|
3
7
|
|
|
4
|
-
#
|
|
8
|
+
# =======
|
|
5
9
|
# Moments
|
|
6
|
-
#
|
|
10
|
+
# =======
|
|
7
11
|
|
|
8
12
|
class MomentsESD(object):
|
|
9
13
|
"""
|
|
@@ -85,9 +89,9 @@ class MomentsESD(object):
|
|
|
85
89
|
# (a_{n,0},...,a_{n,n-1})
|
|
86
90
|
self._a = {0: numpy.array([1.0])}
|
|
87
91
|
|
|
88
|
-
#
|
|
89
|
-
#
|
|
90
|
-
#
|
|
92
|
+
# =
|
|
93
|
+
# m
|
|
94
|
+
# =
|
|
91
95
|
|
|
92
96
|
def m(self, n):
|
|
93
97
|
"""
|
|
@@ -111,9 +115,9 @@ class MomentsESD(object):
|
|
|
111
115
|
self._m[n] = numpy.mean(self.eig ** n)
|
|
112
116
|
return self._m[n]
|
|
113
117
|
|
|
114
|
-
#
|
|
115
|
-
#
|
|
116
|
-
#
|
|
118
|
+
# ======
|
|
119
|
+
# coeffs
|
|
120
|
+
# ======
|
|
117
121
|
|
|
118
122
|
def coeffs(self, n):
|
|
119
123
|
"""
|
|
@@ -129,7 +133,8 @@ class MomentsESD(object):
|
|
|
129
133
|
-------
|
|
130
134
|
|
|
131
135
|
a_n : numpy.ndarray
|
|
132
|
-
Array of shape ``(n,)`` containing :math:`(a_{n,0},
|
|
136
|
+
Array of shape ``(n,)`` containing :math:`(a_{n,0},
|
|
137
|
+
\\dots, a_{n,n-1})`.
|
|
133
138
|
"""
|
|
134
139
|
|
|
135
140
|
if n in self._a:
|
|
@@ -143,6 +148,10 @@ class MomentsESD(object):
|
|
|
143
148
|
self._compute_row(n)
|
|
144
149
|
return self._a[n]
|
|
145
150
|
|
|
151
|
+
# ===========
|
|
152
|
+
# compute row
|
|
153
|
+
# ===========
|
|
154
|
+
|
|
146
155
|
def _compute_row(self, n):
|
|
147
156
|
"""
|
|
148
157
|
Compute and memoize the coefficient row :math:`a_n`.
|
|
@@ -212,9 +221,9 @@ class MomentsESD(object):
|
|
|
212
221
|
|
|
213
222
|
self._a[n] = a_n
|
|
214
223
|
|
|
215
|
-
#
|
|
224
|
+
# --------
|
|
216
225
|
# evaluate
|
|
217
|
-
#
|
|
226
|
+
# --------
|
|
218
227
|
|
|
219
228
|
def __call__(self, n, t=0.0):
|
|
220
229
|
"""
|
|
@@ -254,18 +263,18 @@ class MomentsESD(object):
|
|
|
254
263
|
k = numpy.arange(n, dtype=float)
|
|
255
264
|
return numpy.dot(a_n, numpy.exp(k * t))
|
|
256
265
|
|
|
266
|
+
|
|
257
267
|
# ===========================
|
|
258
268
|
# Algebraic Stieltjes Moments
|
|
259
269
|
# ===========================
|
|
260
270
|
|
|
261
|
-
|
|
262
271
|
class AlgebraicStieltjesMoments(object):
|
|
263
272
|
"""
|
|
264
273
|
Given coefficients a[i,j] for P(z,m)=sum_{i,j} a[i,j] z^i m^j,
|
|
265
274
|
compute the large-|z| branch
|
|
266
275
|
m(z) = sum_{k>=0} mu_series[k] / z^{k+1}.
|
|
267
276
|
|
|
268
|
-
Convention here: choose mu0 (the leading coefficient) by solving the
|
|
277
|
+
Convention here: choose mu0 (the leading coefficient) by solving the
|
|
269
278
|
leading-diagonal equation and (by default) picking the root closest
|
|
270
279
|
to -1, i.e. m(z) ~ -1/z.
|
|
271
280
|
|
|
@@ -281,7 +290,7 @@ class AlgebraicStieltjesMoments(object):
|
|
|
281
290
|
if self.a.ndim != 2:
|
|
282
291
|
raise ValueError("a must be a 2D NumPy array with a[i,j]=a_{ij}.")
|
|
283
292
|
|
|
284
|
-
self.I = self.a.shape[0] - 1
|
|
293
|
+
self.I = self.a.shape[0] - 1 # noqa: E741
|
|
285
294
|
self.J = self.a.shape[1] - 1
|
|
286
295
|
|
|
287
296
|
nz = numpy.argwhere(self.a != 0)
|
|
@@ -320,7 +329,8 @@ class AlgebraicStieltjesMoments(object):
|
|
|
320
329
|
if j > 0:
|
|
321
330
|
self.A0 += j * coeff * self.mu0pow[j - 1]
|
|
322
331
|
if self.A0 == 0:
|
|
323
|
-
raise ValueError("A0 is zero for this mu0; the sequential
|
|
332
|
+
raise ValueError("A0 is zero for this mu0; the sequential " +
|
|
333
|
+
"recursion is degenerate.")
|
|
324
334
|
|
|
325
335
|
# Stored series moments mu_series[0..]
|
|
326
336
|
self._mu = [self.mu0]
|
|
@@ -344,14 +354,17 @@ class AlgebraicStieltjesMoments(object):
|
|
|
344
354
|
coeffs[j] = self.a[i, j]
|
|
345
355
|
|
|
346
356
|
if not numpy.any(coeffs != 0):
|
|
347
|
-
raise ValueError("Leading diagonal polynomial is identically
|
|
357
|
+
raise ValueError("Leading diagonal polynomial is identically " +
|
|
358
|
+
"zero; cannot determine mu0.")
|
|
348
359
|
|
|
349
360
|
deg = int(numpy.max(numpy.nonzero(coeffs)[0]))
|
|
350
|
-
|
|
361
|
+
|
|
362
|
+
# descending powers for numpy.roots
|
|
363
|
+
roots = numpy.roots(coeffs[:deg + 1][::-1])
|
|
351
364
|
|
|
352
365
|
# Targetting mu0 = -1 for ~ -1/z asymptotics
|
|
353
366
|
mu0 = roots[numpy.argmin(numpy.abs(roots + 1))]
|
|
354
|
-
|
|
367
|
+
|
|
355
368
|
if abs(mu0.imag) < 1e-12:
|
|
356
369
|
mu0 = mu0.real
|
|
357
370
|
return mu0
|
|
@@ -363,7 +376,8 @@ class AlgebraicStieltjesMoments(object):
|
|
|
363
376
|
|
|
364
377
|
# Compute f[j] = coefficient of w^k in (S_trunc(w))^j,
|
|
365
378
|
# where S_trunc uses mu_0..mu_{k-1} only (i.e. mu_k treated as 0).
|
|
366
|
-
# Key fact: in the true c[j,k], mu_k can only appear linearly as
|
|
379
|
+
# Key fact: in the true c[j,k], mu_k can only appear linearly as
|
|
380
|
+
# j*mu_k*mu0^{j-1}.
|
|
367
381
|
f = [0] * (self.J + 1)
|
|
368
382
|
f[0] = 0
|
|
369
383
|
for j in range(1, self.J + 1):
|
|
@@ -371,8 +385,9 @@ class AlgebraicStieltjesMoments(object):
|
|
|
371
385
|
# sum_{t=1..k-1} mu_t * c[j-1, k-t]
|
|
372
386
|
for t in range(1, k):
|
|
373
387
|
ssum += self._mu[t] * self._c[j - 1][k - t]
|
|
374
|
-
# recurrence: c[j,k] = mu0*c[j-1,k] + sum_{t=1..k-1}
|
|
375
|
-
#
|
|
388
|
+
# recurrence: c[j,k] = mu0*c[j-1,k] + sum_{t=1..k-1}
|
|
389
|
+
# mu_t*c[j-1,k-t] + mu_k*c[j-1,0] with mu_k=0 for f,
|
|
390
|
+
# and c[j-1,k]=f[j-1]
|
|
376
391
|
f[j] = self.mu0 * f[j - 1] + ssum
|
|
377
392
|
|
|
378
393
|
# Build the linear equation for mu_k:
|
|
@@ -386,7 +401,8 @@ class AlgebraicStieltjesMoments(object):
|
|
|
386
401
|
continue
|
|
387
402
|
rest += coeff * f[j]
|
|
388
403
|
|
|
389
|
-
# lower diagonals s=1..k contribute coeff*c[j,k-s] (already known
|
|
404
|
+
# lower diagonals s=1..k contribute coeff*c[j,k-s] (already known
|
|
405
|
+
# since k-s < k)
|
|
390
406
|
for s in range(1, k + 1):
|
|
391
407
|
entries = self.diag.get(s)
|
|
392
408
|
if not entries:
|
|
@@ -402,7 +418,8 @@ class AlgebraicStieltjesMoments(object):
|
|
|
402
418
|
mu_k = -rest / self.A0
|
|
403
419
|
self._mu.append(mu_k)
|
|
404
420
|
|
|
405
|
-
# Now append the new column k to c using the full convolution
|
|
421
|
+
# Now append the new column k to c using the full convolution
|
|
422
|
+
# recurrence:
|
|
406
423
|
# c[j,k] = sum_{t=0..k} mu_t * c[j-1,k-t]
|
|
407
424
|
for j in range(self.J + 1):
|
|
408
425
|
self._c[j].append(0)
|
|
@@ -430,9 +447,10 @@ class AlgebraicStieltjesMoments(object):
|
|
|
430
447
|
# Estimate the radius of convergence of the Stieltjes
|
|
431
448
|
# series
|
|
432
449
|
if N < 3:
|
|
433
|
-
raise RuntimeError("
|
|
450
|
+
raise RuntimeError("N is too small, choose a larger value.")
|
|
434
451
|
self._ensure(N)
|
|
435
|
-
return max([numpy.abs(self._mu[j] / self._mu[j-1])
|
|
452
|
+
return max([numpy.abs(self._mu[j] / self._mu[j-1])
|
|
453
|
+
for j in range(2, N+1)])
|
|
436
454
|
|
|
437
455
|
def stieltjes(self, z, N):
|
|
438
456
|
# Estimate Stieltjes transform (root) using moment
|
|
@@ -63,7 +63,7 @@ class AlgebraicForm(object):
|
|
|
63
63
|
* ``'complex128'``: 128-bit complex numbers, equivalent of two double
|
|
64
64
|
precision floating point.
|
|
65
65
|
* ``'complex256'``: 256-bit complex numbers, equivalent of two long
|
|
66
|
-
double precision floating point. This
|
|
66
|
+
double precision floating point. This option is only available on
|
|
67
67
|
Linux machines.
|
|
68
68
|
|
|
69
69
|
When using series acceleration methods (such as setting
|
|
@@ -145,7 +145,7 @@ class AlgebraicForm(object):
|
|
|
145
145
|
self.A = None
|
|
146
146
|
self.eig = None
|
|
147
147
|
self._stieltjes = None
|
|
148
|
-
self.
|
|
148
|
+
self._moments = None
|
|
149
149
|
self.support = support
|
|
150
150
|
self.delta = delta # Offset above real axis to apply Plemelj formula
|
|
151
151
|
|
|
@@ -180,7 +180,7 @@ class AlgebraicForm(object):
|
|
|
180
180
|
# Use empirical Stieltjes function
|
|
181
181
|
self._stieltjes = lambda z: \
|
|
182
182
|
numpy.mean(1.0/(self.eig-z[:, numpy.newaxis]), axis=-1)
|
|
183
|
-
self.
|
|
183
|
+
self._moments = MomentsESD(self.eig) # NOTE (never used)
|
|
184
184
|
|
|
185
185
|
# Support
|
|
186
186
|
if support is None:
|
|
@@ -271,7 +271,7 @@ class AlgebraicForm(object):
|
|
|
271
271
|
triangular=triangular, normalize=normalize, mu=mu,
|
|
272
272
|
mu_reg=mu_reg)
|
|
273
273
|
|
|
274
|
-
# Compute global
|
|
274
|
+
# Compute global branch points, zeros of leading a_j, and support
|
|
275
275
|
branch_points, a_s_zero, support = compute_singular_points(a_coeffs)
|
|
276
276
|
|
|
277
277
|
self.a_coeffs = a_coeffs
|
|
@@ -294,7 +294,7 @@ class AlgebraicForm(object):
|
|
|
294
294
|
status['res_99_9'] = float(res_99_9)
|
|
295
295
|
status['fit_metrics'] = fit_metrics
|
|
296
296
|
self.status = status
|
|
297
|
-
self._stieltjes = StieltjesPoly(self.a_coeffs)
|
|
297
|
+
self._stieltjes = StieltjesPoly(self.a_coeffs) # NOTE overwrite init
|
|
298
298
|
|
|
299
299
|
if verbose:
|
|
300
300
|
print(f'fit residual max : {res_max:>0.4e}')
|
|
@@ -462,11 +462,11 @@ class AlgebraicForm(object):
|
|
|
462
462
|
|
|
463
463
|
# Preallocate density to zero
|
|
464
464
|
hilb = -self._stieltjes(x).real / numpy.pi
|
|
465
|
-
|
|
465
|
+
|
|
466
466
|
if plot:
|
|
467
467
|
plot_hilbert(x, hilb, support=self.support, latex=latex,
|
|
468
468
|
save=save)
|
|
469
|
-
|
|
469
|
+
|
|
470
470
|
return hilb
|
|
471
471
|
|
|
472
472
|
# =========
|
|
@@ -531,7 +531,7 @@ class AlgebraicForm(object):
|
|
|
531
531
|
# Create x if not given
|
|
532
532
|
if x is None:
|
|
533
533
|
x = self._generate_grid(2.0, extend=2.0)[::2]
|
|
534
|
-
|
|
534
|
+
|
|
535
535
|
# Create y if not given
|
|
536
536
|
if (plot is False) and (y is None):
|
|
537
537
|
# Do not use a Cartesian grid. Create a 1D array z slightly above
|
|
@@ -544,13 +544,13 @@ class AlgebraicForm(object):
|
|
|
544
544
|
y = numpy.linspace(-1, 1, 200)
|
|
545
545
|
x_grid, y_grid = numpy.meshgrid(x.real, y.real)
|
|
546
546
|
z = x_grid + 1j * y_grid # shape (Ny, Nx)
|
|
547
|
-
|
|
547
|
+
|
|
548
548
|
m = self._stieltjes(z, progress=True)
|
|
549
|
-
|
|
549
|
+
|
|
550
550
|
if plot:
|
|
551
551
|
plot_stieltjes(x, y, m, m, self.broad_support, latex=latex,
|
|
552
552
|
save=save)
|
|
553
|
-
|
|
553
|
+
|
|
554
554
|
return m
|
|
555
555
|
|
|
556
556
|
# ==============
|
|
@@ -611,8 +611,10 @@ class AlgebraicForm(object):
|
|
|
611
611
|
alpha = numpy.atleast_1d(size) / self.n
|
|
612
612
|
|
|
613
613
|
# Lower and upper bound on new support
|
|
614
|
-
hilb_lb =
|
|
615
|
-
|
|
614
|
+
hilb_lb = \
|
|
615
|
+
(1.0 / self._stieltjes(self.lam_m + self.delta * 1j).item()).real
|
|
616
|
+
hilb_ub = \
|
|
617
|
+
(1.0 / self._stieltjes(self.lam_p + self.delta * 1j).item()).real
|
|
616
618
|
lb = self.lam_m - (numpy.max(alpha) - 1) * hilb_lb
|
|
617
619
|
ub = self.lam_p - (numpy.max(alpha) - 1) * hilb_ub
|
|
618
620
|
|
|
@@ -639,7 +641,8 @@ class AlgebraicForm(object):
|
|
|
639
641
|
t = numpy.log(alpha)
|
|
640
642
|
|
|
641
643
|
# Ensure it starts from t = 0
|
|
642
|
-
t
|
|
644
|
+
if t[0] > 1.0:
|
|
645
|
+
t = numpy.concatenate([numpy.zeros(1), t])
|
|
643
646
|
|
|
644
647
|
# Evolve
|
|
645
648
|
W, ok = decompress_newton(
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.7.9"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|