[Scipy-svn] r2069 - trunk/Lib/sandbox/svm/tests
scipy-svn at scipy.org
scipy-svn at scipy.org
Mon Jul 10 16:56:06 EDT 2006
Author: fullung
Date: 2006-07-10 15:55:59 -0500 (Mon, 10 Jul 2006)
New Revision: 2069
Modified:
trunk/Lib/sandbox/svm/tests/test_regression.py
Log:
Tweak so that test passes with GCC.
Modified: trunk/Lib/sandbox/svm/tests/test_regression.py
===================================================================
--- trunk/Lib/sandbox/svm/tests/test_regression.py 2006-07-10 20:42:24 UTC (rev 2068)
+++ trunk/Lib/sandbox/svm/tests/test_regression.py 2006-07-10 20:55:59 UTC (rev 2069)
@@ -65,7 +65,12 @@
model = LibSvmEpsilonRegressionModel(kernel, epsilon, cost)
results = model.fit(traindata)
predictions = results.predict(testdata)
- assert_array_almost_equal(predictions, expected_y)
+ # look at differences instead of using assertAlmostEqual
+ # due to slight differences between answers obtained on
+ # Windows with MSVC 7.1 and on Fedora Core 5 with GCC
+ # 4.1.1.
+ diff = N.absolute(predictions - expected_y)
+ self.assert_(N.alltrue(diff < 1e-3))
def check_cross_validate(self):
y = N.randn(100)
More information about the Scipy-svn
mailing list