Open dimitargslavchev opened 1 month ago
Hi @dimitargslavchev, are you sure you are using the latest version (2.1)? I just ran this code and I received
In [7]: r = baryrat.brasil(lambda x: x**0.5, (0, 1), (7,6), tol=eps, npi=-30, maxiter=10000)
warning: BRASIL did not converge; dev=6.36e-12, err=6.98e-05
Hi Clemence,
Indeed I was using an older version. I have updated to 2.1 but I still get an error. Here is the full code
---------------- #!/usr/bin/env python3
from baryrat import brasil from mpmath import mp import argparse import numpy as np
mp.dps = 100
parser = argparse.ArgumentParser(description="Generate BURA coefficients") parser.add_argument("k", type=int, help="BURA degree") parser.add_argument("alpha", type=float, help="fractional power") args = parser.parse_args()
eps = np.finfo(np.double).eps r = brasil(lambda x: x**args.alpha, (0.5, 1), (args.k, args.k-1), tol=eps, npi=-30, maxiter=10000)
$ ./bura_mul_interval.py 7 0.5 /home/dslavchev/.local/lib/python3.10/site-packages/baryrat.py:903: RuntimeWarning: divide by zero encountered in double_scalars
deviation = max_err / local_max.min() - 1 warning: BRASIL did not converge; dev=1.0, err=4.44e-16 Traceback (most recent call last):
File "/home/dslavchev/NuclearTesting/0_local_tests/2024_multiplicative_BURA_with_BRASIL/python_code/./bura_mul_interval.py", line 22, in
d = np.flip(np.sort(np.real(r.poles(True))))
File "/home/dslavchev/.local/lib/python3.10/site-packages/baryrat.py", line 262, in poles
return _compute_roots(self.weights, self.nodes, use_mp=True)
File "/home/dslavchev/.local/lib/python3.10/site-packages/baryrat.py", line 45, in _compute_roots
assert flamp, 'flamp package is not installed' AssertionError: flamp package is not installed
Greetings from Sozopol, Dimitar
-------- Оригинално писмо --------
От: Clemens @.***
Относно: Re: [c-f-h/baryrat] Received error when using brasil with deg = (m,n), m != n (Issue #9)
До: c-f-h/baryrat
Изпратено на: 17.06.2024 15:42
Hi @dimitargslavchev , are you sure you are using the latest version (2.1)? I just ran this code and I received
In [7]: r = baryrat.brasil(lambda x: x**0.5, (0, 1), (7,6), tol=eps, npi=-30, maxiter=10000)
warning: BRASIL did not converge; dev=6.36e-12, err=6.98e-05
— Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you were mentioned. Message ID: @ github . com>
------=_Part_871626_1102343272.1718650167092 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
Hi @= dimitargslavchev, are you sure you are using the latest version (2.1)? = I just ran this code and I received
=20In [7]: r =3D baryrat.brasil(lambda x: x**0.5, (0, 1), (7,6), =
tol=3Deps, npi=3D-30, maxiter=3D10000)
warning: BRASIL did not converge; dev=3D6.36e-12, err=3D6.98e-05
=20
=E2=80=94
Reply to this em=
ail directly, view it on GitHub, or unsubscribe.
You are receiving this because y=
ou were mentioned.
------=_Part_871626_1102343272.1718650167092--
"AssertionError: flamp package is not installed"
It seems you are missing the flamp package?
Hello,
I want to generate rational approximation of degree (m,n) m!=n.
I invoke brasil with: eps = np.finfo(np.double).eps r = brasil(lambda x: x**args.alpha, (0, 1), (7,6), tol=eps, npi=-30, maxiter=10000)
where alpha is the fractional power.
I get the following error:
Traceback (most recent call last): File "./python_code/./bura_mul_k1.py", line 20, in
r = brasil(lambda x: x*args.alpha, (0, 1), (m,n), tol=eps, npi=-30, maxiter=10000)
File "./python_code/baryrat.py", line 513, in brasil
n = 2 deg + 1 # number of interpolation nodes
TypeError: can only concatenate tuple (not "int") to tuple
Best Regards, Dimitar