[SCM] Packaging for numexpr branch, master, updated. debian/1.4.2-2-5-g7c98e4a

Antonio Valentino antonio.valentino at tiscali.it
Sat Feb 18 17:29:37 UTC 2012


The following commit has been merged in the master branch:
commit 73f3490b9152f01a6a3951b5af4f9f72f5ff2602
Author: Antonio Valentino <antonio.valentino at tiscali.it>
Date:   Sat Feb 18 11:33:39 2012 +0100

    Use assert_approx_equal instead of assert_almost_equal

diff --git a/debian/patches/fix-unittests.patch b/debian/patches/fix-unittests.patch
index 50c78e3..f4c201a 100644
--- a/debian/patches/fix-unittests.patch
+++ b/debian/patches/fix-unittests.patch
@@ -6,47 +6,14 @@ https://groups.google.com/group/numexpr/browse_thread/thread/bb777b53da34bbd0
 
 --- a/numexpr/tests/test_numexpr.py
 +++ b/numexpr/tests/test_numexpr.py
-@@ -73,29 +73,29 @@
+@@ -73,8 +73,8 @@
                        ('prod_ddn', 'r0', 't3', 2)])
          # Check that full reductions work.
          x = zeros(1e5)+.01   # checks issue #41
 -        assert_equal(evaluate("sum(x+2,axis=0)"), sum(x+2,axis=0))
 -        assert_equal(evaluate("prod(x,axis=0)"), prod(x,axis=0))
-+        assert_almost_equal(evaluate("sum(x+2,axis=0)"), sum(x+2,axis=0))
-+        assert_almost_equal(evaluate("prod(x,axis=0)"), prod(x,axis=0))
++        assert_approx_equal(evaluate("sum(x+2,axis=0)"), sum(x+2,axis=0))
++        assert_approx_equal(evaluate("prod(x,axis=0)"), prod(x,axis=0))
          # Check that reductions along an axis work
          y = arange(9.0).reshape(3,3)
--        assert_equal(evaluate("sum(y**2, axis=1)"), sum(y**2, axis=1))
--        assert_equal(evaluate("sum(y**2, axis=0)"), sum(y**2, axis=0))
--        assert_equal(evaluate("sum(y**2, axis=None)"), sum(y**2, axis=None))
--        assert_equal(evaluate("prod(y**2, axis=1)"), prod(y**2, axis=1))
--        assert_equal(evaluate("prod(y**2, axis=0)"), prod(y**2, axis=0))
--        assert_equal(evaluate("prod(y**2, axis=None)"), prod(y**2, axis=None))
-+        assert_almost_equal(evaluate("sum(y**2, axis=1)"), sum(y**2, axis=1))
-+        assert_almost_equal(evaluate("sum(y**2, axis=0)"), sum(y**2, axis=0))
-+        assert_almost_equal(evaluate("sum(y**2, axis=None)"), sum(y**2, axis=None))
-+        assert_almost_equal(evaluate("prod(y**2, axis=1)"), prod(y**2, axis=1))
-+        assert_almost_equal(evaluate("prod(y**2, axis=0)"), prod(y**2, axis=0))
-+        assert_almost_equal(evaluate("prod(y**2, axis=None)"), prod(y**2, axis=None))
-         # Check integers
-         x = arange(10.)
-         x = x.astype(int)
--        assert_equal(evaluate("sum(x**2+2,axis=0)"), sum(x**2+2,axis=0))
--        assert_equal(evaluate("prod(x**2+2,axis=0)"), prod(x**2+2,axis=0))
-+        assert_almost_equal(evaluate("sum(x**2+2,axis=0)"), sum(x**2+2,axis=0))
-+        assert_almost_equal(evaluate("prod(x**2+2,axis=0)"), prod(x**2+2,axis=0))
-         # Check longs
-         x = x.astype(long)
--        assert_equal(evaluate("sum(x**2+2,axis=0)"), sum(x**2+2,axis=0))
--        assert_equal(evaluate("prod(x**2+2,axis=0)"), prod(x**2+2,axis=0))
-+        assert_almost_equal(evaluate("sum(x**2+2,axis=0)"), sum(x**2+2,axis=0))
-+        assert_almost_equal(evaluate("prod(x**2+2,axis=0)"), prod(x**2+2,axis=0))
-         # Check complex
-         x = x + 5j
--        assert_equal(evaluate("sum(x**2+2,axis=0)"), sum(x**2+2,axis=0))
--        assert_equal(evaluate("prod(x**2+2,axis=0)"), prod(x**2+2,axis=0))
-+        assert_almost_equal(evaluate("sum(x**2+2,axis=0)"), sum(x**2+2,axis=0))
-+        assert_almost_equal(evaluate("prod(x**2+2,axis=0)"), prod(x**2+2,axis=0))
- 
-     def test_axis(self):
-         y = arange(9.0).reshape(3,3)
+         assert_equal(evaluate("sum(y**2, axis=1)"), sum(y**2, axis=1))

-- 
Packaging for numexpr



More information about the debian-science-commits mailing list