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

scipy-svn@scip... scipy-svn@scip...
Fri Nov 19 22:44:53 CST 2010


Author: warren.weckesser
Date: 2010-11-19 22:44:53 -0600 (Fri, 19 Nov 2010)
New Revision: 6909

Modified:
   trunk/scipy/cluster/vq.py
Log:
ENH: cluster: update 'raise' statements

Modified: trunk/scipy/cluster/vq.py
===================================================================
--- trunk/scipy/cluster/vq.py	2010-11-20 04:36:39 UTC (rev 6908)
+++ trunk/scipy/cluster/vq.py	2010-11-20 04:44:53 UTC (rev 6909)
@@ -488,7 +488,7 @@
 
     """
     if int(iter) < 1:
-        raise ValueError, 'iter must be >= to 1.'
+        raise ValueError('iter must be at least 1.')
     if type(k_or_guess) == type(array([])):
         guess = k_or_guess
         if guess.size < 1:
@@ -584,8 +584,8 @@
 
 def _missing_raise():
     """raise a ClusterError when called."""
-    raise ClusterError, "One of the clusters is empty. "\
-                        "Re-run kmean with a different initialization."
+    raise ClusterError("One of the clusters is empty. "
+                        "Re-run kmean with a different initialization.")
 
 _valid_miss_meth = {'warn': _missing_warn, 'raise': _missing_raise}
 



More information about the Scipy-svn mailing list