[Scipy-svn] r2184 - trunk/Lib/sandbox/svm

scipy-svn at scipy.org scipy-svn at scipy.org
Tue Aug 29 05:46:15 CDT 2006


Author: fullung
Date: 2006-08-29 05:45:55 -0500 (Tue, 29 Aug 2006)
New Revision: 2184

Modified:
   trunk/Lib/sandbox/svm/classification.py
   trunk/Lib/sandbox/svm/predict.py
Log:
Undo axis changes to itertools.repeat calls.


Modified: trunk/Lib/sandbox/svm/classification.py
===================================================================
--- trunk/Lib/sandbox/svm/classification.py	2006-08-29 10:30:44 UTC (rev 2183)
+++ trunk/Lib/sandbox/svm/classification.py	2006-08-29 10:45:55 UTC (rev 2184)
@@ -55,7 +55,7 @@
             d = {}
             labels = self.labels
             for v, (li, lj) in \
-                    izip(vv, chain(*[izip(repeat(x,axis=0), labels[i+1:])
+                    izip(vv, chain(*[izip(repeat(x), labels[i+1:])
                                      for i, x in enumerate(labels[:-1])])):
                 d[li, lj] = v
                 d[lj, li] = -v

Modified: trunk/Lib/sandbox/svm/predict.py
===================================================================
--- trunk/Lib/sandbox/svm/predict.py	2006-08-29 10:30:44 UTC (rev 2183)
+++ trunk/Lib/sandbox/svm/predict.py	2006-08-29 10:45:55 UTC (rev 2184)
@@ -114,7 +114,7 @@
             vote = N.zeros((nr_class, dec_values.shape[0]), N.uint32)
             classidx = range(nr_class)
             for pos, (i, j) in \
-                    enumerate(chain(*[izip(repeat(idx,axis=0), classidx[k+1:])
+                    enumerate(chain(*[izip(repeat(idx), classidx[k+1:])
                                       for k, idx in
                                       enumerate(classidx[:-1])])):
                 ji = N.array((j, i))



More information about the Scipy-svn mailing list