[Numpy-svn] r6002 - trunk/numpy/core/tests
numpy-svn at scipy.org
numpy-svn at scipy.org
Tue Nov 11 02:34:30 EST 2008
Author: charris
Date: 2008-11-11 01:34:25 -0600 (Tue, 11 Nov 2008)
New Revision: 6002
Modified:
trunk/numpy/core/tests/test_umath.py
Log:
Test to see what problem with logaddexp is on some machines.
Modified: trunk/numpy/core/tests/test_umath.py
===================================================================
--- trunk/numpy/core/tests/test_umath.py 2008-11-11 06:52:15 UTC (rev 6001)
+++ trunk/numpy/core/tests/test_umath.py 2008-11-11 07:34:25 UTC (rev 6002)
@@ -53,7 +53,7 @@
yf = np.array(y, dtype=dt)
assert_almost_equal(np.exp2(yf), xf)
-class TestLogAddExp2(TestCase):
+class TestLogAddExp2(object):
# Need test for intermediate precisions
def test_logaddexp2_values(self) :
x = [1, 2, 3, 4, 5]
@@ -66,9 +66,9 @@
assert_almost_equal(np.logaddexp2(xf, yf), zf, decimal=dec)
def test_logaddexp2_range(self) :
- x = [1000000, -1000000, 2000000, -2000000]
- y = [2000000, -2000000, 1000000, -1000000]
- z = [2000000, -1000000, 2000000, -1000000]
+ x = [1000000., -1000000., 2000000., -2000000.]
+ y = [2000000., -2000000., 1000000., -1000000.]
+ z = [2000000., -1000000., 2000000., -1000000.]
for dt in ['f','d','g'] :
logxf = np.array(x, dtype=dt)
logyf = np.array(y, dtype=dt)
@@ -95,7 +95,7 @@
yf = np.array(y, dtype=dt)*log2_
assert_almost_equal(np.exp(yf), xf)
-class TestLogAddExp(TestCase):
+class TestLogAddExp(object):
def test_logaddexp_values(self) :
x = [1, 2, 3, 4, 5]
y = [5, 4, 3, 2, 1]
@@ -107,9 +107,9 @@
assert_almost_equal(np.logaddexp(xf, yf), zf, decimal=dec)
def test_logaddexp_range(self) :
- x = [1000000, -1000000, 2000000, -2000000]
- y = [2000000, -2000000, 1000000, -1000000]
- z = [2000000, -1000000, 2000000, -1000000]
+ x = [1000000., -1000000., 2000000., -2000000.]
+ y = [2000000., -2000000., 1000000., -1000000.]
+ z = [2000000., -1000000., 2000000., -1000000.]
for dt in ['f','d','g'] :
logxf = np.array(x, dtype=dt)
logyf = np.array(y, dtype=dt)
More information about the Numpy-svn
mailing list