freealg 0.6.0__py3-none-any.whl → 0.6.1__py3-none-any.whl
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/__version__.py +1 -1
- freealg/_chebyshev.py +8 -8
- freealg/_jacobi.py +123 -51
- freealg/freeform.py +50 -23
- {freealg-0.6.0.dist-info → freealg-0.6.1.dist-info}/METADATA +1 -1
- {freealg-0.6.0.dist-info → freealg-0.6.1.dist-info}/RECORD +10 -10
- {freealg-0.6.0.dist-info → freealg-0.6.1.dist-info}/WHEEL +0 -0
- {freealg-0.6.0.dist-info → freealg-0.6.1.dist-info}/licenses/AUTHORS.txt +0 -0
- {freealg-0.6.0.dist-info → freealg-0.6.1.dist-info}/licenses/LICENSE.txt +0 -0
- {freealg-0.6.0.dist-info → freealg-0.6.1.dist-info}/top_level.txt +0 -0
freealg/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.6.
|
|
1
|
+
__version__ = "0.6.1"
|
freealg/_chebyshev.py
CHANGED
|
@@ -203,7 +203,7 @@ def chebyshev_stieltjes(z, psi, support, continuation='pade',
|
|
|
203
203
|
Methof of analytiv continuation.
|
|
204
204
|
|
|
205
205
|
dtype : numpy.type, default=numpy.complex128
|
|
206
|
-
Data type for
|
|
206
|
+
Data type for complex arrays. This might enhance series acceleration.
|
|
207
207
|
|
|
208
208
|
Returns
|
|
209
209
|
-------
|
|
@@ -218,7 +218,7 @@ def chebyshev_stieltjes(z, psi, support, continuation='pade',
|
|
|
218
218
|
span = lam_p - lam_m
|
|
219
219
|
center = 0.5 * (lam_m + lam_p)
|
|
220
220
|
|
|
221
|
-
# Map z
|
|
221
|
+
# Map z to u in the standard [-1,1] domain
|
|
222
222
|
u = (2.0 * (z - center)) / span
|
|
223
223
|
|
|
224
224
|
# Inverse-Joukowski: pick branch sqrt with +Im
|
|
@@ -232,15 +232,15 @@ def chebyshev_stieltjes(z, psi, support, continuation='pade',
|
|
|
232
232
|
|
|
233
233
|
# This depends on the method of analytic continuation
|
|
234
234
|
if continuation == 'pade':
|
|
235
|
-
#
|
|
235
|
+
# Horner summation for S0(J) = sum_{k=0}^K psi_k * J**k
|
|
236
236
|
K = len(psi) - 1
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
S =
|
|
237
|
+
S0 = numpy.zeros_like(J)
|
|
238
|
+
for k in range(K, -1, -1):
|
|
239
|
+
S0 = psi[k] + J * S0
|
|
240
|
+
S = J * S0
|
|
241
241
|
|
|
242
242
|
else:
|
|
243
|
-
# Flatten J before passing to
|
|
243
|
+
# Flatten J before passing to any of the acceleration methods.
|
|
244
244
|
psi_zero = numpy.concatenate([[0.0], psi])
|
|
245
245
|
Sn = partial_sum(psi_zero, J.ravel(), p=0)
|
|
246
246
|
|
freealg/_jacobi.py
CHANGED
|
@@ -97,7 +97,7 @@ def jacobi_kernel_proj(xs, pdf, support, K=10, alpha=0.0, beta=0.0, reg=0.0):
|
|
|
97
97
|
Pk = eval_jacobi(k, alpha, beta, t)
|
|
98
98
|
N_k = jacobi_sq_norm(k, alpha, beta)
|
|
99
99
|
|
|
100
|
-
#
|
|
100
|
+
# \int P_k(t) w(t) \rho(t) dt. w(t) cancels with pdf already being rho
|
|
101
101
|
moment = numpy.trapz(Pk * pdf, xs)
|
|
102
102
|
|
|
103
103
|
if k == 0:
|
|
@@ -168,36 +168,41 @@ def jacobi_density(x, psi, support, alpha=0.0, beta=0.0):
|
|
|
168
168
|
# jacobi stieltjes
|
|
169
169
|
# ================
|
|
170
170
|
|
|
171
|
-
def jacobi_stieltjes(z, psi, support, alpha=0.0, beta=0.0,
|
|
171
|
+
def jacobi_stieltjes(z, cache, psi, support, alpha=0.0, beta=0.0, n_quad=None,
|
|
172
172
|
continuation='pade', dtype=numpy.complex128):
|
|
173
173
|
"""
|
|
174
174
|
Compute m(z) = sum_k psi_k * m_k(z) where
|
|
175
175
|
|
|
176
|
-
|
|
176
|
+
.. math::
|
|
177
|
+
|
|
178
|
+
m_k(z) = \\int \\frac{w^{(alpha, beta)}(t) P_k^{(alpha, beta)}(t)}{
|
|
179
|
+
(u(z)-t)} \\mathrm{d} t
|
|
177
180
|
|
|
178
181
|
Each m_k is evaluated *separately* with a Gauss-Jacobi rule sized
|
|
179
|
-
for that k.
|
|
182
|
+
for that k. This follows the user's request: 1 quadrature rule per P_k.
|
|
180
183
|
|
|
181
184
|
Parameters
|
|
182
185
|
----------
|
|
183
186
|
|
|
184
187
|
z : complex or ndarray
|
|
185
188
|
|
|
189
|
+
cache : dict
|
|
190
|
+
Pass a dict to enable cross-call caching.
|
|
191
|
+
|
|
186
192
|
psi : (K+1,) array_like
|
|
187
193
|
|
|
188
194
|
support : (lambda_minus, lambda_plus)
|
|
189
195
|
|
|
190
196
|
alpha, beta : float
|
|
191
197
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
n_quad = max(n_base, k+1).
|
|
198
|
+
n_quad : int, default=None
|
|
199
|
+
Number of Gauss-Jacobi quadrature points.
|
|
195
200
|
|
|
196
201
|
continuation : str, default= ``'pade'``
|
|
197
|
-
|
|
202
|
+
Method of analytic continuation.
|
|
198
203
|
|
|
199
204
|
dtype : numpy.type, default=numpy.complex128
|
|
200
|
-
Data type for
|
|
205
|
+
Data type for complex arrays. This might enhance series acceleration.
|
|
201
206
|
|
|
202
207
|
Returns
|
|
203
208
|
-------
|
|
@@ -209,67 +214,132 @@ def jacobi_stieltjes(z, psi, support, alpha=0.0, beta=0.0, n_base=40,
|
|
|
209
214
|
Same shape as z
|
|
210
215
|
"""
|
|
211
216
|
|
|
217
|
+
if not isinstance(cache, dict):
|
|
218
|
+
raise TypeError('"cache" must be a dict; pass a persistent dict '
|
|
219
|
+
'(e.g., self.cache).')
|
|
220
|
+
|
|
221
|
+
# Number of quadratures
|
|
222
|
+
if 'n_quad' not in cache:
|
|
223
|
+
if n_quad is None:
|
|
224
|
+
# Set number of quadratures based on Bernstein ellipse. Here using
|
|
225
|
+
# an evaluation point a with distance delta from support, to
|
|
226
|
+
# achieve the quadrature error below tol.
|
|
227
|
+
tol = 1e-16
|
|
228
|
+
delta = 1e-2
|
|
229
|
+
n_quad = int(-numpy.log(tol) / (2.0 * numpy.sqrt(delta)))
|
|
230
|
+
n_quad = max(n_quad, psi.size)
|
|
231
|
+
cache['n_quad'] = n_quad
|
|
232
|
+
else:
|
|
233
|
+
n_quad = cache['n_quad']
|
|
234
|
+
|
|
235
|
+
# Quadrature nodes and weights
|
|
236
|
+
if ('t_nodes' not in cache) or ('w_nodes' not in cache):
|
|
237
|
+
t_nodes, w_nodes = roots_jacobi(n_quad, alpha, beta) # (n_quad,)
|
|
238
|
+
cache['t_nodes'] = t_nodes
|
|
239
|
+
cache['w_nodes'] = w_nodes
|
|
240
|
+
else:
|
|
241
|
+
t_nodes = cache['t_nodes']
|
|
242
|
+
w_nodes = cache['w_nodes']
|
|
243
|
+
|
|
212
244
|
z = numpy.asarray(z, dtype=dtype)
|
|
213
245
|
lam_minus, lam_plus = support
|
|
214
246
|
span = lam_plus - lam_minus
|
|
215
247
|
centre = 0.5 * (lam_plus + lam_minus)
|
|
216
248
|
|
|
217
|
-
# Map z
|
|
249
|
+
# Map z to u in the standard [-1,1] domain
|
|
218
250
|
u = (2.0 / span) * (z - centre)
|
|
219
251
|
|
|
220
|
-
|
|
252
|
+
# Cauchy Kernel (flattened for all z)
|
|
253
|
+
u_flat = u.ravel()
|
|
254
|
+
ker = (1.0 / (t_nodes[:, None] - u_flat[None, :])).astype(
|
|
255
|
+
dtype, copy=False) # (n_quad, Ny*Nx)
|
|
256
|
+
|
|
257
|
+
if continuation == 'pade':
|
|
258
|
+
|
|
259
|
+
if 'integrand_nodes' not in cache:
|
|
260
|
+
|
|
261
|
+
# Compute sum_k psi_k P_k (call it s_node)
|
|
262
|
+
s_nodes = numpy.zeros_like(t_nodes, dtype=dtype)
|
|
263
|
+
for k, psi_k in enumerate(psi):
|
|
264
|
+
|
|
265
|
+
# Evaluate P_k at the quadrature nodes
|
|
266
|
+
P_k_nodes = eval_jacobi(k, alpha, beta, t_nodes) # (n_quad,)
|
|
267
|
+
s_nodes += psi_k * P_k_nodes
|
|
268
|
+
|
|
269
|
+
integrand_nodes = (2.0 / span) * (w_nodes * s_nodes).astype(dtype)
|
|
270
|
+
cache['integrand_nodes'] = integrand_nodes
|
|
221
271
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
272
|
+
else:
|
|
273
|
+
integrand_nodes = cache['integrand_nodes']
|
|
274
|
+
|
|
275
|
+
Q_flat = (integrand_nodes[:, None] * ker).sum(axis=0)
|
|
276
|
+
m_total = Q_flat.reshape(z.shape)
|
|
277
|
+
|
|
278
|
+
return m_total
|
|
279
|
+
|
|
280
|
+
else:
|
|
225
281
|
|
|
226
|
-
|
|
227
|
-
#
|
|
228
|
-
n_quad = max(n_base, k + 1)
|
|
229
|
-
t_nodes, w_nodes = roots_jacobi(n_quad, alpha, beta) # (n_quad,)
|
|
282
|
+
# Continuation is not Pade. This is one of Wynn, Levin, etc. These
|
|
283
|
+
# methods need the series for m for 1, ..., k.
|
|
230
284
|
|
|
231
|
-
|
|
232
|
-
|
|
285
|
+
if 'B' not in cache:
|
|
286
|
+
# All P_k at quadrature nodes (real), row-scale by weights
|
|
287
|
+
P_nodes = numpy.empty((psi.size, n_quad), dtype=w_nodes.dtype)
|
|
288
|
+
for k in range(psi.size):
|
|
289
|
+
P_nodes[k, :] = eval_jacobi(k, alpha, beta, t_nodes)
|
|
233
290
|
|
|
234
|
-
|
|
235
|
-
|
|
291
|
+
# All P_k * w shape (K+1, n_quad)
|
|
292
|
+
B = (2.0 / span) * (P_nodes * w_nodes[None, :]).astype(
|
|
293
|
+
dtype, copy=False)
|
|
294
|
+
cache['B'] = B
|
|
236
295
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
296
|
+
else:
|
|
297
|
+
B = cache['B']
|
|
298
|
+
|
|
299
|
+
# Principal branch. 2D matrix for all k
|
|
300
|
+
m_k_all = B @ ker
|
|
240
301
|
|
|
241
|
-
#
|
|
242
|
-
m_k =
|
|
302
|
+
# Compute m on secondary branch from the principal branch, which is
|
|
303
|
+
# m_k = m_k + 2 \pi i rho_k(z), and rho(z) is the analytic extension of
|
|
304
|
+
# rho_k(x) using the k-th basis. Basically, rho_k(z) is w * P_k(z).
|
|
243
305
|
|
|
244
|
-
#
|
|
245
|
-
|
|
306
|
+
# Lower-half-plane jump for ALL k at once (vectorized)
|
|
307
|
+
mask_m = (z.imag <= 0)
|
|
308
|
+
if numpy.any(mask_m):
|
|
309
|
+
idx = numpy.flatnonzero(mask_m.ravel())
|
|
310
|
+
u_m = u_flat[idx].astype(dtype, copy=False) # complex
|
|
246
311
|
|
|
247
|
-
#
|
|
248
|
-
#
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
312
|
+
# Scipy's eval_jacobi tops out at complex128 type. If u_m is
|
|
313
|
+
# complex256, downcast to complex128.
|
|
314
|
+
if u_m.dtype.itemsize > numpy.dtype(numpy.complex128).itemsize:
|
|
315
|
+
u_m_eval = u_m.astype(numpy.complex128, copy=False)
|
|
316
|
+
down_cast = True
|
|
317
|
+
else:
|
|
318
|
+
u_m_eval = u_m
|
|
319
|
+
down_cast = False
|
|
253
320
|
|
|
254
|
-
#
|
|
255
|
-
|
|
256
|
-
|
|
321
|
+
# P_k at complex u_m (all means for all k = 1,...,K)
|
|
322
|
+
P_all_m = numpy.empty((psi.size, u_m.size), dtype=dtype)
|
|
323
|
+
for k in range(psi.size):
|
|
324
|
+
P_all_m[k, :] = eval_jacobi(k, alpha, beta, u_m_eval)
|
|
257
325
|
|
|
258
|
-
#
|
|
259
|
-
|
|
260
|
-
alpha=alpha, beta=beta).reshape(z_m.shape)
|
|
326
|
+
# Jacobi weight. Must match jacobi_density's branch
|
|
327
|
+
w_m = numpy.power(1.0 - u_m, alpha) * numpy.power(1.0 + u_m, beta)
|
|
261
328
|
|
|
262
|
-
#
|
|
263
|
-
|
|
264
|
-
|
|
329
|
+
# rho_k(z) in x-units is (2/span) * w(u) * P_k(u)
|
|
330
|
+
rho_all = ((2.0 / span) * w_m[None, :] * P_all_m).astype(
|
|
331
|
+
dtype, copy=False)
|
|
265
332
|
|
|
266
|
-
|
|
267
|
-
|
|
333
|
+
if down_cast:
|
|
334
|
+
rho_all = rho_all.astype(dtype)
|
|
268
335
|
|
|
269
|
-
|
|
270
|
-
|
|
336
|
+
# compute analytic extension of rho(z) to lower-half plane for when
|
|
337
|
+
# rho is just the k-th Jacobi basis: w(z) P_k(z). For this, we
|
|
338
|
+
m_k_all[:, idx] = m_k_all[:, idx] + (2.0 * numpy.pi * 1j) * rho_all
|
|
271
339
|
|
|
272
|
-
|
|
340
|
+
# Partial sums S_k = sum_{j<=k} psi_j * m_j
|
|
341
|
+
WQ = (psi[:, None].astype(dtype, copy=False) * m_k_all)
|
|
342
|
+
m_partial = numpy.cumsum(WQ, axis=0)
|
|
273
343
|
|
|
274
344
|
if continuation == 'wynn-eps':
|
|
275
345
|
S = wynn_epsilon(m_partial)
|
|
@@ -281,7 +351,9 @@ def jacobi_stieltjes(z, psi, support, alpha=0.0, beta=0.0, n_base=40,
|
|
|
281
351
|
S = weniger_delta(m_partial)
|
|
282
352
|
elif continuation == 'brezinski':
|
|
283
353
|
S = brezinski_theta(m_partial)
|
|
354
|
+
else:
|
|
355
|
+
# No acceleration (likely diverges in the lower-half plane)
|
|
356
|
+
S = m_partial[-1, :]
|
|
284
357
|
|
|
285
358
|
m_total = S.reshape(z.shape)
|
|
286
|
-
|
|
287
|
-
return m_total
|
|
359
|
+
return m_total
|
freealg/freeform.py
CHANGED
|
@@ -178,10 +178,13 @@ class FreeForm(object):
|
|
|
178
178
|
# Detect support
|
|
179
179
|
self.lam_m, self.lam_p = supp(self.eig, **kwargs)
|
|
180
180
|
else:
|
|
181
|
-
self.lam_m = support[0]
|
|
182
|
-
self.lam_p = support[1]
|
|
181
|
+
self.lam_m = float(support[0])
|
|
182
|
+
self.lam_p = float(support[1])
|
|
183
183
|
self.support = (self.lam_m, self.lam_p)
|
|
184
184
|
|
|
185
|
+
# Number of quadrature points to evaluate Stieltjes using Gauss-Jacobi
|
|
186
|
+
self.n_quad = None
|
|
187
|
+
|
|
185
188
|
# Initialize
|
|
186
189
|
self.method = None # fitting rho: jacobi, chebyshev
|
|
187
190
|
self.continuation = None # analytic continuation: pade, wynn
|
|
@@ -189,15 +192,17 @@ class FreeForm(object):
|
|
|
189
192
|
self.psi = None # coefficients of estimating rho
|
|
190
193
|
self.alpha = None # Jacobi polynomials alpha parameter
|
|
191
194
|
self.beta = None # Jacobi polynomials beta parameter
|
|
195
|
+
self.cache = {} # Cache inner-computations
|
|
192
196
|
|
|
193
197
|
# ===
|
|
194
198
|
# fit
|
|
195
199
|
# ===
|
|
196
200
|
|
|
197
|
-
def fit(self, method='jacobi', K=10, alpha=0.0, beta=0.0,
|
|
198
|
-
projection='gaussian', kernel_bw=0.001, damp=None,
|
|
199
|
-
continuation='pade', pade_p=0, pade_q=1,
|
|
200
|
-
pade_reg=0.0, optimizer='ls', plot=False,
|
|
201
|
+
def fit(self, method='jacobi', K=10, alpha=0.0, beta=0.0, n_quad=60,
|
|
202
|
+
reg=0.0, projection='gaussian', kernel_bw=0.001, damp=None,
|
|
203
|
+
force=False, continuation='pade', pade_p=0, pade_q=1,
|
|
204
|
+
odd_side='left', pade_reg=0.0, optimizer='ls', plot=False,
|
|
205
|
+
latex=False, save=False):
|
|
201
206
|
"""
|
|
202
207
|
Fit model to eigenvalues.
|
|
203
208
|
|
|
@@ -221,6 +226,11 @@ class FreeForm(object):
|
|
|
221
226
|
fitting model on the left side of interval. This should be greater
|
|
222
227
|
then -1. This option is only applicable when ``method='jacobi'``.
|
|
223
228
|
|
|
229
|
+
n_quad : int, default=60
|
|
230
|
+
Number of quadrature points to evaluate Stieltjes transform later
|
|
231
|
+
on (when :func:`decompress` is called) using Gauss-Jacob
|
|
232
|
+
quadrature. This option is relevant only if ``method='jacobi'``.
|
|
233
|
+
|
|
224
234
|
reg : float, default=0.0
|
|
225
235
|
Tikhonov regularization coefficient.
|
|
226
236
|
|
|
@@ -336,6 +346,10 @@ class FreeForm(object):
|
|
|
336
346
|
>>> from freealg import FreeForm
|
|
337
347
|
"""
|
|
338
348
|
|
|
349
|
+
# Very important: reset cache whenever this function is called. This
|
|
350
|
+
# also empties all references holdign a cache copy.
|
|
351
|
+
self.cache.clear()
|
|
352
|
+
|
|
339
353
|
if alpha <= -1:
|
|
340
354
|
raise ValueError('"alpha" should be greater then "-1".')
|
|
341
355
|
|
|
@@ -351,6 +365,10 @@ class FreeForm(object):
|
|
|
351
365
|
# Project eigenvalues to Jacobi polynomials basis
|
|
352
366
|
if method == 'jacobi':
|
|
353
367
|
|
|
368
|
+
# Set number of Gauss-Jacobi quadratures. This is not used in this
|
|
369
|
+
# function (used later when decompress is called)
|
|
370
|
+
self.n_quad = n_quad
|
|
371
|
+
|
|
354
372
|
if projection == 'sample':
|
|
355
373
|
psi = jacobi_sample_proj(self.eig, support=self.support, K=K,
|
|
356
374
|
alpha=alpha, beta=beta, reg=reg)
|
|
@@ -726,6 +744,7 @@ class FreeForm(object):
|
|
|
726
744
|
|
|
727
745
|
See Also
|
|
728
746
|
--------
|
|
747
|
+
|
|
729
748
|
density
|
|
730
749
|
hilbert
|
|
731
750
|
|
|
@@ -757,7 +776,7 @@ class FreeForm(object):
|
|
|
757
776
|
|
|
758
777
|
# Create y if not given
|
|
759
778
|
if (plot is False) and (y is None):
|
|
760
|
-
# Do
|
|
779
|
+
# Do not use a Cartesian grid. Create a 1D array z slightly above
|
|
761
780
|
# the real line.
|
|
762
781
|
y = self.delta * 1j
|
|
763
782
|
z = x.astype(complex) + y # shape (Nx,)
|
|
@@ -809,25 +828,27 @@ class FreeForm(object):
|
|
|
809
828
|
if self.psi is None:
|
|
810
829
|
raise RuntimeError('"fit" the model first.')
|
|
811
830
|
|
|
812
|
-
# Allow for arbitrary input shapes
|
|
813
831
|
z = numpy.asarray(z)
|
|
814
|
-
shape = z.shape
|
|
815
|
-
if len(shape) == 0:
|
|
816
|
-
shape = (1,)
|
|
817
|
-
z = z.reshape(-1, 1)
|
|
818
|
-
|
|
819
|
-
# # Set the number of bases as the number of x points insides support
|
|
820
|
-
# mask_sup = numpy.logical_and(z.real >= self.lam_m,
|
|
821
|
-
# z.real <= self.lam_p)
|
|
822
|
-
# n_base = 2 * numpy.sum(mask_sup)
|
|
823
832
|
|
|
824
833
|
# Stieltjes function
|
|
825
834
|
if self.method == 'jacobi':
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
835
|
+
|
|
836
|
+
# Number of quadrature points
|
|
837
|
+
if z.ndim == 2:
|
|
838
|
+
# set to twice num x points inside support. This oversampling
|
|
839
|
+
# avoids anti-aliasing when visualizing.
|
|
840
|
+
x = z[0, :].real
|
|
841
|
+
mask_sup = numpy.logical_and(x >= self.lam_m, x <= self.lam_p)
|
|
842
|
+
n_quad = 2 * numpy.sum(mask_sup)
|
|
843
|
+
else:
|
|
844
|
+
# If this is None, the calling function will handle it.
|
|
845
|
+
n_quad = self.n_quad
|
|
846
|
+
|
|
847
|
+
stieltjes = partial(jacobi_stieltjes, cache=self.cache,
|
|
848
|
+
psi=self.psi, support=self.support,
|
|
849
|
+
alpha=self.alpha, beta=self.beta,
|
|
850
|
+
continuation=self.continuation,
|
|
851
|
+
dtype=self.dtype, n_quad=n_quad)
|
|
831
852
|
|
|
832
853
|
elif self.method == 'chebyshev':
|
|
833
854
|
stieltjes = partial(chebyshev_stieltjes, psi=self.psi,
|
|
@@ -835,6 +856,12 @@ class FreeForm(object):
|
|
|
835
856
|
continuation=self.continuation,
|
|
836
857
|
dtype=self.dtype)
|
|
837
858
|
|
|
859
|
+
# Allow for arbitrary input shapes
|
|
860
|
+
shape = z.shape
|
|
861
|
+
if len(shape) == 0:
|
|
862
|
+
shape = (1,)
|
|
863
|
+
z = z.reshape(-1, 1)
|
|
864
|
+
|
|
838
865
|
mask_p = z.imag >= 0.0
|
|
839
866
|
mask_m = z.imag < 0.0
|
|
840
867
|
|
|
@@ -930,7 +957,7 @@ class FreeForm(object):
|
|
|
930
957
|
Estimated spectral density at locations x. ``rho`` can be a 1D or
|
|
931
958
|
2D array output:
|
|
932
959
|
|
|
933
|
-
* If ``size`` is a scalar, ``rho`` is a 1D array
|
|
960
|
+
* If ``size`` is a scalar, ``rho`` is a 1D array of the same size
|
|
934
961
|
as ``x``.
|
|
935
962
|
* If ``size`` is an array of size `n`, ``rho`` is a 2D array with
|
|
936
963
|
`n` rows, where each row corresponds to decompression to a size.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
freealg/__init__.py,sha256=muuYCvlsXjuX1W67YGFca9nFxprFsALLyB3CrJpXFnY,728
|
|
2
|
-
freealg/__version__.py,sha256=
|
|
3
|
-
freealg/_chebyshev.py,sha256=
|
|
2
|
+
freealg/__version__.py,sha256=baAcEjLSYFIeNZF51tOMmA_zAMhN8HvKael-UU-Ruec,22
|
|
3
|
+
freealg/_chebyshev.py,sha256=zkyVA8NLf7uUKlJdLz4ijd_SurdsqUgkA5nHGWSybaE,6916
|
|
4
4
|
freealg/_damp.py,sha256=k2vtBtWOxQBf4qXaWu_En81lQBXbEO4QbxxWpvuVhdE,1802
|
|
5
5
|
freealg/_decompress.py,sha256=bFhQx--uptWJ7OjVwEs_tWYT6mLijBKJ9EbrD24Sbl0,32199
|
|
6
|
-
freealg/_jacobi.py,sha256=
|
|
6
|
+
freealg/_jacobi.py,sha256=z0X6Ws_BEo_h8EQBzDNHGFhLF9F2PUmnGeBVs0bNL7w,10709
|
|
7
7
|
freealg/_linalg.py,sha256=0BzJNTXiY1VH3OKrCFgbE0QHLgRoKyiILsBWtnygFGc,13141
|
|
8
8
|
freealg/_pade.py,sha256=BthDHScn2lILTTU2hlGNP-8YqddU3Uyxe0n0FkprwDs,13645
|
|
9
9
|
freealg/_plot_util.py,sha256=GKvmc1wjVGeqoomrULPbzBEt6P86FdoR2idBLYh5EDY,20068
|
|
@@ -11,16 +11,16 @@ freealg/_sample.py,sha256=yLJSGlq27j8tA-kDntRwfHIUU8Oo2IOmOTxS8yTRGRU,3075
|
|
|
11
11
|
freealg/_series.py,sha256=33LLCUe4svmV0eWyzhP_XClfDzccQHTW9WBJlYlLfHY,11475
|
|
12
12
|
freealg/_support.py,sha256=nxDa2OFlWBgjD0_1qoSMWG7kub6-GIuxIA04n5bdaYw,6614
|
|
13
13
|
freealg/_util.py,sha256=NaEhcOxbue44l_xAhefnNZYTy3pBBGBFyk9HdaRjQKo,6899
|
|
14
|
-
freealg/freeform.py,sha256=
|
|
14
|
+
freealg/freeform.py,sha256=FBC9ab-3JWaQibMAM4LlbYPYvELaUDReJWCwAG0Fwwg,43779
|
|
15
15
|
freealg/distributions/__init__.py,sha256=t_yZyEkW_W_tSV9IvgYXtVASxD2BEdiNVXcV2ebMy8M,579
|
|
16
16
|
freealg/distributions/_kesten_mckay.py,sha256=BM_U8cX3eRstbAA4IZRK4qA_6S9zcogaXeuHyKXen14,19897
|
|
17
17
|
freealg/distributions/_marchenko_pastur.py,sha256=xwk40GwpLvEm9--FN7-T2NWtHTkfzcvOS4tFyrm71ww,16990
|
|
18
18
|
freealg/distributions/_meixner.py,sha256=8zmDnoCp-GOMnd6T2rKLQaMfn6uFmSnd-i5PLlfGOUM,17526
|
|
19
19
|
freealg/distributions/_wachter.py,sha256=d601xAaFSVGeK13SSDavjsJ5a-MJnI2mgzWiplX0Quk,16898
|
|
20
20
|
freealg/distributions/_wigner.py,sha256=w8OlZL9pSfGnXVSSB6A4KBiImr0Zz4iH2PDLCHFfpaY,15877
|
|
21
|
-
freealg-0.6.
|
|
22
|
-
freealg-0.6.
|
|
23
|
-
freealg-0.6.
|
|
24
|
-
freealg-0.6.
|
|
25
|
-
freealg-0.6.
|
|
26
|
-
freealg-0.6.
|
|
21
|
+
freealg-0.6.1.dist-info/licenses/AUTHORS.txt,sha256=0b67Nz4_JgIzUupHJTAZxu5QdSUM_HRM_X_w4xCb17o,30
|
|
22
|
+
freealg-0.6.1.dist-info/licenses/LICENSE.txt,sha256=J-EEYEtxb3VVf_Bn1TYfWnpY5lMFIM15iLDDcnaDTPA,1443
|
|
23
|
+
freealg-0.6.1.dist-info/METADATA,sha256=0iyTPrQe2ZBGlPQr9dAOsunwRx_KS6dRFSaz__Uq2oI,5530
|
|
24
|
+
freealg-0.6.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
25
|
+
freealg-0.6.1.dist-info/top_level.txt,sha256=eR2wrgYwDdnnJ9Zf5PruPqe4kQav0GMvRsqct6y00Q8,8
|
|
26
|
+
freealg-0.6.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|