[Python-modules-commits] r23403 - in packages/scipy/trunk/debian (3 files)

jtaylor-guest at users.alioth.debian.org jtaylor-guest at users.alioth.debian.org
Sun Jan 27 16:53:04 UTC 2013


    Date: Sunday, January 27, 2013 @ 16:53:02
  Author: jtaylor-guest
Revision: 23403

patch from upstream to fix a failing test with regenerated files

Added:
  packages/scipy/trunk/debian/patches/fix-test_basic.py-cephes_vs_amos_mass_te.patch
Modified:
  packages/scipy/trunk/debian/changelog
  packages/scipy/trunk/debian/patches/series

Modified: packages/scipy/trunk/debian/changelog
===================================================================
--- packages/scipy/trunk/debian/changelog	2013-01-27 16:52:45 UTC (rev 23402)
+++ packages/scipy/trunk/debian/changelog	2013-01-27 16:53:02 UTC (rev 23403)
@@ -5,6 +5,7 @@
     - drop interpnd-generator.patch
     - new: BUG-remove-inline-statement-rejected-by-cython.patch
     - new: BUG-fix-dependency-on-dict-ordering-in-test.patch
+    - new: fix-test_basic.py-cephes_vs_amos_mass_te.patch
 
  -- Julian Taylor <jtaylor.debian at googlemail.com>  Fri, 25 Jan 2013 23:54:43 +0100
 

Added: packages/scipy/trunk/debian/patches/fix-test_basic.py-cephes_vs_amos_mass_te.patch
===================================================================
--- packages/scipy/trunk/debian/patches/fix-test_basic.py-cephes_vs_amos_mass_te.patch	                        (rev 0)
+++ packages/scipy/trunk/debian/patches/fix-test_basic.py-cephes_vs_amos_mass_te.patch	2013-01-27 16:53:02 UTC (rev 23403)
@@ -0,0 +1,48 @@
+From 6c1cd446bb6c3ffcc131de5b81e21b481400c334
+From: Pauli Virtanen <pav at 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 c4371bb..184f4c9 100644
+--- a/scipy/special/tests/test_basic.py
++++ b/scipy/special/tests/test_basic.py
+@@ -1640,17 +1640,23 @@ class TestBessel(TestCase):
+         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.4
+

Modified: packages/scipy/trunk/debian/patches/series
===================================================================
--- packages/scipy/trunk/debian/patches/series	2013-01-27 16:52:45 UTC (rev 23402)
+++ packages/scipy/trunk/debian/patches/series	2013-01-27 16:53:02 UTC (rev 23403)
@@ -6,3 +6,4 @@
 up_minpack_ints.diff
 BUG-fix-dependency-on-dict-ordering-in-test.patch
 BUG-remove-inline-statement-rejected-by-cython.patch
+fix-test_basic.py-cephes_vs_amos_mass_te.patch
\ No newline at end of file




More information about the Python-modules-commits mailing list