[Scipy-svn] r4471 - trunk/scipy/cluster

scipy-svn@scip... scipy-svn@scip...
Tue Jun 24 03:01:31 CDT 2008


Author: cdavid
Date: 2008-06-24 03:01:24 -0500 (Tue, 24 Jun 2008)
New Revision: 4471

Modified:
   trunk/scipy/cluster/vq.py
Log:
Fix 535 first comment.

Modified: trunk/scipy/cluster/vq.py
===================================================================
--- trunk/scipy/cluster/vq.py	2008-06-24 07:59:43 UTC (rev 4470)
+++ trunk/scipy/cluster/vq.py	2008-06-24 08:01:24 UTC (rev 4471)
@@ -370,10 +370,10 @@
     """
 
     code_book = array(guess, copy = True)
-    nc = code_book.shape[0]
     avg_dist = []
     diff = thresh+1.
     while diff > thresh:
+        nc = code_book.shape[0]
         #compute membership and distances between obs and code_book
         obs_code, distort = vq(obs, code_book)
         avg_dist.append(mean(distort, axis=-1))



More information about the Scipy-svn mailing list