diff python/utils.py @ 665:15e244d2a1b5

corrected bug with circular import for VideoFilenameAddable, moved to base module
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 20 May 2015 13:57:47 +0200
parents 784298512b60
children 179b81faa1f8
line wrap: on
line diff
--- a/python/utils.py	Wed May 20 12:04:22 2015 +0200
+++ b/python/utils.py	Wed May 20 13:57:47 2015 +0200
@@ -1,12 +1,9 @@
 #! /usr/bin/env python
 ''' Generic utilities.'''
 
-#from numpy import *
-#from pylab import *
 from datetime import time, datetime
 from math import sqrt
 
-__metaclass__ = type
 
 datetimeFormat = "%Y-%m-%d %H:%M:%S"
 
@@ -57,7 +54,7 @@
         result += ((e-o)*(e-o))/e
     return result
 
-class EmpiricalDistribution:
+class EmpiricalDistribution(object):
     def nSamples(self):
         return sum(self.counts)
 
@@ -321,7 +318,7 @@
 # sequence section
 #########################
 
-class LCSS:
+class LCSS(object):
     '''Class that keeps the LCSS parameters
     and puts together the various computations'''
     def __init__(self, similarityFunc, delta = float('inf'), aligned = False, lengthFunc = min):
@@ -450,7 +447,7 @@
     counts.append(counts[-1])
     return [firstX]+sortedX+[lastX], counts
 
-class PlottingPropertyValues:
+class PlottingPropertyValues(object):
     def __init__(self, values):
         self.values = values