summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/scipy/files/scipy-0.11.0-test_basic.patch')
-rw-r--r--sci-libs/scipy/files/scipy-0.11.0-test_basic.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/sci-libs/scipy/files/scipy-0.11.0-test_basic.patch b/sci-libs/scipy/files/scipy-0.11.0-test_basic.patch
new file mode 100644
index 000000000000..0b1018a3b9c0
--- /dev/null
+++ b/sci-libs/scipy/files/scipy-0.11.0-test_basic.patch
@@ -0,0 +1,48 @@
+From 6c1cd446bb6c3ffcc131de5b81e21b481400c334 Mon Sep 17 00:00:00 2001
+From: Pauli Virtanen <pav@iki.fi>
+Date: Sat, 3 Nov 2012 17:13:30 +0200
+Subject: [PATCH] TST: special: fix test_basic.py:cephes_vs_amos_mass_test
+
+---
+ scipy/special/tests/test_basic.py | 22 ++++++++++++++--------
+ 1 file changed, 14 insertions(+), 8 deletions(-)
+
+diff --git a/scipy/special/tests/test_basic.py b/scipy/special/tests/test_basic.py
+index 973322a..6ef4f7f 100644
+--- a/scipy/special/tests/test_basic.py
++++ b/scipy/special/tests/test_basic.py
+@@ -1770,17 +1770,23 @@ def test_iv_cephes_vs_amos_mass_test(self):
+ x = np.random.pareto(0.2, N) * (-1)**np.random.randint(2, size=N)
+
+ imsk = (np.random.randint(8, size=N) == 0)
+- v[imsk] = v.astype(int)
++ v[imsk] = v[imsk].astype(int)
+
+- c1 = special.iv(v, x)
+- c2 = special.iv(v, x+0j)
++ old_err = np.seterr(all='ignore')
++ try:
++ c1 = special.iv(v, x)
++ c2 = special.iv(v, x+0j)
+
+- # deal with differences in the inf cutoffs
+- c1[abs(c1) > 1e300] = np.inf
+- c2[abs(c2) > 1e300] = np.inf
++ # deal with differences in the inf and zero cutoffs
++ c1[abs(c1) > 1e300] = np.inf
++ c2[abs(c2) > 1e300] = np.inf
++ c1[abs(c1) < 1e-300] = 0
++ c2[abs(c2) < 1e-300] = 0
+
+- dc = abs(c1/c2 - 1)
+- dc[np.isnan(dc)] = 0
++ dc = abs(c1/c2 - 1)
++ dc[np.isnan(dc)] = 0
++ finally:
++ np.seterr(**old_err)
+
+ k = np.argmax(dc)
+
+--
+1.7.10
+