Skip to content

Commit

Permalink
Relax tolerance in _fpoly.py doctest.
Browse files Browse the repository at this point in the history
Sometime tests fail due to too strict tolerance.
Change 1e-12 to 1e-11.
  • Loading branch information
nennigb authored Jul 10, 2024
1 parent 396ffff commit 7771305
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions eastereig/fpoly/_fpoly.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,22 @@ def polyvalnd(nu, a):
>>> a1 = np.random.rand(5)*(1+1j)
>>> pvalf = polyvalnd(2.253+0.1j, a1)
>>> pvalnp = polyval(2.253+0.1j, a1)
>>> abs(pvalf - pvalnp) < 1e-12
>>> abs(pvalf - pvalnp) < 1e-11
True
>>> a2 = np.random.rand(5, 5)*(1+1j)
>>> pvalf = polyvalnd((2.253+0j, 1+1j), a2)
>>> pvalnp = polyval2d(2.253+0j, 1+1j, a2)
>>> abs(pvalf - pvalnp) < 1e-12
>>> abs(pvalf - pvalnp) < 1e-11
True
>>> a3 = np.random.rand(5, 5, 5)*(1+1j)
>>> pvalf = polyvalnd((2.253, 1+1j, 0.1+2j), a3)
>>> pvalnp = polyval3d(2.253, 1+1j, 0.1+2j, a3)
>>> abs(pvalf - pvalnp) < 1e-12
>>> abs(pvalf - pvalnp) < 1e-11
True
>>> a4 = np.random.rand(5, 5, 5, 5)*(1+1j)
>>> pvalf = polyvalnd((2.253, 1+1j, 0.1+2j, -0.8+0.2j), a4)
>>> pvalnp = pu._valnd(polyval, a4, 2.253, 1+1j, 0.1+2j, -0.8+0.2j)
>>> abs(pvalf - pvalnp) < 1e-12
>>> abs(pvalf - pvalnp) < 1e-11
True
"""
d = len(a.shape)
Expand Down

0 comments on commit 7771305

Please sign in to comment.