From 46b959cceb84df9bec854a2b4fc50eda5ebfb3dc Mon Sep 17 00:00:00 2001 From: Ilya Kolpakov Date: Tue, 4 Sep 2012 11:55:30 +0200 Subject: [PATCH] ufunc tests now ensure that return value is the same object as the 'output' (if it is provided) argument being the same object as the ufunc return value --- libs/numpy/test/ufunc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/numpy/test/ufunc.py b/libs/numpy/test/ufunc.py index 0cedeabb..205183d2 100755 --- a/libs/numpy/test/ufunc.py +++ b/libs/numpy/test/ufunc.py @@ -19,7 +19,7 @@ class TestUnary(unittest.TestCase): assert_array_almost_equal(b, a*2.0) c = numpy.zeros(5, dtype=float) d = f(a,output=c) - assert_array_almost_equal(c, a*2.0) + self.assert_(c is d) assert_array_almost_equal(d, a*2.0) def testList(self): @@ -42,7 +42,7 @@ class TestBinary(unittest.TestCase): assert_array_almost_equal(f(a,b), (a*2+b*3)) c = numpy.zeros(5, dtype=float) d = f(a,b,output=c) - assert_array_almost_equal(c, a*2 + b*3) + self.assert_(c is d) assert_array_almost_equal(d, a*2 + b*3) assert_array_almost_equal(f(a, 2.0), a*2 + 6.0) assert_array_almost_equal(f(1.0, b), 2.0 + b*3)