diff python/ml.py @ 636:3058e00887bc

removed all issues because of tests with None, using is instead of == or !=
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Tue, 24 Mar 2015 18:11:28 +0100
parents 39de5c532559
children 15e244d2a1b5
line wrap: on
line diff
--- a/python/ml.py	Tue Mar 24 14:17:12 2015 +0100
+++ b/python/ml.py	Tue Mar 24 18:11:28 2015 +0100
@@ -71,7 +71,7 @@
     localdata = copy(data) # shallow copy to avoid modifying data
     if shuffleData:
         shuffle(localdata)
-    if initialCentroids == None:
+    if initialCentroids is None:
         centroids = [Centroid(localdata[0])]
     else:
         centroids = deepcopy(initialCentroids)