[Scipy-svn] r2083 - trunk/Lib/sandbox/svm/tests

scipy-svn at scipy.org scipy-svn at scipy.org
Wed Jul 12 05:37:11 EDT 2006


Author: stefan
Date: 2006-07-12 04:37:02 -0500 (Wed, 12 Jul 2006)
New Revision: 2083

Modified:
   trunk/Lib/sandbox/svm/tests/test_classification.py
   trunk/Lib/sandbox/svm/tests/test_regression.py
Log:
'randn' is no longer in top level namespace. Call N.random.randn.


Modified: trunk/Lib/sandbox/svm/tests/test_classification.py
===================================================================
--- trunk/Lib/sandbox/svm/tests/test_classification.py	2006-07-12 08:32:51 UTC (rev 2082)
+++ trunk/Lib/sandbox/svm/tests/test_classification.py	2006-07-12 09:37:02 UTC (rev 2083)
@@ -102,7 +102,7 @@
 
     def check_cross_validate(self):
         labels = ([-1] * 50) + ([1] * 50)
-        x = N.randn(len(labels), 10)
+        x = N.random.randn(len(labels), 10)
         traindata = LibSvmClassificationDataSet(zip(labels, x))
         kernel = LinearKernel()
         model = LibSvmCClassificationModel(kernel)

Modified: trunk/Lib/sandbox/svm/tests/test_regression.py
===================================================================
--- trunk/Lib/sandbox/svm/tests/test_regression.py	2006-07-12 08:32:51 UTC (rev 2082)
+++ trunk/Lib/sandbox/svm/tests/test_regression.py	2006-07-12 09:37:02 UTC (rev 2083)
@@ -73,8 +73,8 @@
             self.assert_(N.alltrue(diff < 1e-3))
 
     def check_cross_validate(self):
-        y = N.randn(100)
-        x = N.randn(len(y), 10)
+        y = N.random.randn(100)
+        x = N.random.randn(len(y), 10)
         traindata = LibSvmRegressionDataSet(zip(y, x))
         kernel = LinearKernel()
         model = LibSvmEpsilonRegressionModel(kernel)




More information about the Scipy-svn mailing list