diff python/indicators.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 2d1d33ae1c69
children dc70d9e711f5
line wrap: on
line diff
--- a/python/indicators.py	Tue Mar 24 14:17:12 2015 +0100
+++ b/python/indicators.py	Tue Mar 24 18:11:28 2015 +0100
@@ -98,7 +98,7 @@
 
 
 def l1Distance(x, y): # lambda x,y:abs(x-y)
-    if x == None or y == None:
+    if x is None or y is None:
         return float('inf')
     else:
         return abs(x-y)
@@ -112,7 +112,7 @@
         self.minLength = minLength
 
     def checkIndicator(self, indicator):
-        return indicator != None and len(indicator) >= self.minLength
+        return indicator is not None and len(indicator) >= self.minLength
 
     def compute(self, indicator1, indicator2, computeSubSequence = False):
         if self.checkIndicator(indicator1) and self.checkIndicator(indicator2):