[Scipy-svn] r6520 - trunk/scipy/special/tests
scipy-svn at scipy.org
scipy-svn at scipy.org
Thu Jun 17 16:36:51 EDT 2010
Author: ptvirtan
Date: 2010-06-17 15:36:51 -0500 (Thu, 17 Jun 2010)
New Revision: 6520
Modified:
trunk/scipy/special/tests/test_basic.py
trunk/scipy/special/tests/test_data.py
Log:
BUG: special: adjust test tolerances to be more lenient about numerical differences on non-x86 platforms
Modified: trunk/scipy/special/tests/test_basic.py
===================================================================
--- trunk/scipy/special/tests/test_basic.py 2010-06-17 20:36:36 UTC (rev 6519)
+++ trunk/scipy/special/tests/test_basic.py 2010-06-17 20:36:51 UTC (rev 6520)
@@ -1592,7 +1592,7 @@
self.check_cephes_vs_amos(yv, yn, rtol=1e-11, atol=1e-305, skip=skipper)
def test_iv_cephes_vs_amos(self):
- self.check_cephes_vs_amos(iv, iv, rtol=1e-12, atol=1e-305)
+ self.check_cephes_vs_amos(iv, iv, rtol=5e-9, atol=1e-305)
@dec.slow
def test_iv_cephes_vs_amos_mass_test(self):
@@ -1607,6 +1607,10 @@
c1 = iv(v, x)
c2 = iv(v, x+0j)
+ # deal with differences in the inf cutoffs
+ c1[abs(c1) > 1e300] = np.inf
+ c2[abs(c2) > 1e300] = np.inf
+
dc = abs(c1/c2 - 1)
dc[np.isnan(dc)] = 0
@@ -1614,7 +1618,7 @@
# Most error apparently comes from AMOS and not our implementation;
# there are some problems near integer orders there
- assert dc[k] < 1e-9, (iv(v[k], x[k]), iv(v[k], x[k]+0j))
+ assert dc[k] < 1e-9, (v[k], x[k], iv(v[k], x[k]), iv(v[k], x[k]+0j))
def test_kv_cephes_vs_amos(self):
#self.check_cephes_vs_amos(kv, kn, rtol=1e-9, atol=1e-305)
Modified: trunk/scipy/special/tests/test_data.py
===================================================================
--- trunk/scipy/special/tests/test_data.py 2010-06-17 20:36:36 UTC (rev 6519)
+++ trunk/scipy/special/tests/test_data.py 2010-06-17 20:36:51 UTC (rev 6520)
@@ -140,7 +140,7 @@
data(gammaincinv, 'gamma_inv_data_ipp-gamma_inv_data', (0,1), 2,
rtol=1e-12),
data(gammaincinv, 'gamma_inv_big_data_ipp-gamma_inv_big_data',
- (0,1), 2, rtol=5e-12),
+ (0,1), 2, rtol=1e-11),
# XXX: the data file needs reformatting...
#data(gammaincinv, 'gamma_inv_small_data_ipp-gamma_inv_small_data',
More information about the Scipy-svn
mailing list